Triton Circonflexe created THRIFT-5403:
------------------------------------------

             Summary: Compiler improvement or GPL-2.0 exception for lex & yacc 
parser files
                 Key: THRIFT-5403
                 URL: https://issues.apache.org/jira/browse/THRIFT-5403
             Project: Thrift
          Issue Type: Wish
          Components: Compiler (General)
    Affects Versions: 0.14.1
         Environment: Wireshark dissector.
            Reporter: Triton Circonflexe


A little bit of context first: I'm currently working on Thrift dissection in 
Wireshark ([#16244|https://gitlab.com/wireshark/wireshark/-/issues/16244] for 
the curious ones) and after this update on the generic binary protocol parsing 
part, I'd like to work on the dissection of Thrift packets according to 
provided {{.thrift}} files.

In order to do this, several options are possible:
# Update the thrift compiler to be able to generate a lua or a C sub-dissector 
leveraging the sub-dissection capabilities of the Thrift dissector (not usable 
for the moment as sub-struct, list, set and map are not available).
# Update the thrift compiler to be able to generate a lua or a C sub-dissector 
doing all the dissection.
# Add a parser for {{.thrift}} files in Wireshark and patch things together to 
be able to see {{day_of_week = sunday}} instead of {{field type = i32, field id 
= 3, i32 value = 0}} without having to generate a sub-dissector.

Given the fact that it was the approach retained for 
[Protobuf|https://gitlab.com/wireshark/wireshark/-/commit/5750c4981c56464ef1dbb8d7cfb0446cdb4b12ec],
 I believe the third option to be the best track regarding the amount of work 
and the usability.

Now, regarding the implementation of this parser, I see 2 options:
# Reuse {{thriftl.ll}} & {{thrifty.yy}} to ensure perfect compatibility.
# Rewrite them from scratch using [Thrift interface description 
language|https://thrift.apache.org/docs/idl.html] documentation with some risks 
of incompatibility.

However, Wireshark is GPL-2.0 or later and Thrift (including the lex & yacc 
files) is of course Apache-2.0 with the incompatibility explained at 
[https://www.apache.org/licenses/GPL-compatibility.html].

So, would it be possible to make the license for those 2 files compatible with 
the GPL-2.0-or-later or do I need to work from the specs now?

NB: I did notice the -or-later in Wireshark's license and the fact that GPL-3.0 
software can include Apache-2.0 code but I'm not a lawyer so I prefer to be on 
the safe side before I even take a look after the header of these files. :)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to