OK-DMR / Hytera_Homebrew_Bridge

[BETA] protocol translator between Hytera repeaters 8.x and 9.x and MMDVM / Homebrew servers (hblink3, freedmr, ...)
GNU Affero General Public License v3.0
27 stars 24 forks source link

Create Wireshark dissector for protocols implemented #1

Open smarek opened 4 years ago

smarek commented 4 years ago

This is related issue, not core issue, however I'm not skilled in Lua, so I'm gonna need some help here

Guide on how to import sub-classes in wireshark dissectors https://mika-s.github.io/wireshark/lua/dissector/2018/12/18/creating-a-wireshark-dissector-in-lua-5.html

Also it might be easier to develop the dissector as binary plugin in C/C++ instead of Lua, due to wireshark Lua limitations

smarek commented 4 years ago

Lua runtime modified for 5.2 provided in cdc83b0f8933cb3ec28f5b8e7b7370fd5b55c1d3

KOLANICH commented 4 years ago

BTW, can the dissector generator either be a separate project from Hytera Homebrew Bridge, or even better a part of KSC (wireshark dissectors target is a long awaited item in the wishlist).

smarek commented 4 years ago

@KOLANICH It should be, kaitai-to-wireshark is not really generator, as it does not reflect upon KSC definitions and hierarchy, and what I'm coding here is not generator either

if the KSC Lua runtime will be compatible with Lua 5.2, it should be doable, however I'm really unqualified in Lua, and it seems to me, that the dissector must be generated directly from KSC definitions, and it's not possible to just wrap around generated Lua classes.

KOLANICH commented 4 years ago

It largery depends on the API Wireshark exposes and on availibility of "debug" code generation for lua target.

More precisely, debug API allows to get offsets for each seq member. I have built upon "debug" API a tool generating tags for WxHexEditor

smarek commented 4 years ago

I might have dive depper into debug, because I hoped for some kind of object introspection/reflection on java/python to generate the final lua, instead of using the generated lua and wrapping around them

smarek commented 4 years ago

But seeing the tests Translator, it might be easier to write similar Wireshark translator instead

smarek commented 3 years ago

I've just updated ksy definitions and Lua runtime as well, so now it should be quite easy to finish that, but I'd still appreciate any help on that