zoranbosnjak / asterix-specs

EUROCONTROL asterix specifications in structured format.
https://zoranbosnjak.github.io/asterix-specs/
BSD 3-Clause "New" or "Revised" License
22 stars 14 forks source link

Having 'group' in 'extended' breaks Wireshark dissector generator #18

Closed JaapKeuter closed 2 years ago

JaapKeuter commented 2 years ago

It seems that with commit b50cd5317e76b3abe44c56ae86e44c04bebce7bf the first instance of a group contained in an extend appeared. Since then the Wireshark dissector generator fails on this code found in specs/cat021/cat-2.6.ast

    040 "Target Report Descriptor"
        definition
            Type and characteristics of the data as transmitted by a system.
        extended 8 8
.....
            TBC "Total Bits Corrected"
                group
                    EP "Element Populated Bit"
                        element 1
                            table
                                0: Element not populated
                                1: Element populated
                    VAL "Value"
                        element 6
                            unsigned integer
                        remark
                            Bits 7/2 contain the total number of bit corrections applied to all
                            Extended Squitter Messages used for the composition of this
                            Category 021 Target Report (regardless of the ages of the Extended
                            Squitter messages). More details on the techniques applied for error
                            correction can be found in EUROCAE ED-102B/RTCA DO-260C
                            [11], Appendix I “Extended Squitter Enhanced Reception
                            Techniques”.

It seems to raise an exception in get_bit_size() when working on '# iterate over items, reinsert FX bits' in handle_variation() while trying to determine the size of the 'group', which does not have one.

With the Wireshark 4.0 release expected later this month, this issue needs resolution to get the updates in the protocols added in that release.

JaapKeuter commented 2 years ago

The issue is tracked in the Wireshark repository as issue 18238

zoranbosnjak commented 2 years ago

The observation is correct. Wireshark dissector generator was adjusted, to handle this case. See wireshark repository for details.