Generate dissector from JSON message description

asked 2018-06-18 08:53:46 +0000

densha gravatar image

I am planning to develop a dissector for a propietary protocol.

I have defined the protocol in JSON and I would like to read in the JSON and create a disector.

I would like to create ProtoFields based on this on the JSON input. This JSON file is also read in by C++ to create the programs generating the messages, hence the default fields. I can enhance the JSON to include dissector specific fields that are not use in the C++ code.

Example JSON fields. I would need to define byte, julian-date and string unpackers in Lua.

{"name":"status", "type":"byte", "default":5},
{"name":"datefield", "type":"julian-date", "default":0},
{"name":"contact", "type":"string", "length":20},

In Hadriel Kaplan's Class 11 at SharkFest'15 (at 52minutes) he mentions a more advanced way to define ProtoFields for disectors.

Could some point me to a dissector that uses Lua Tables for for storing the Protofields?

Is it possible in LUA to dynamically create the dissector from a JSON format. Has anyone done this before?



edit retag flag offensive close merge delete