I’m working on a wireshark dissector in lua to dissect a custom protocol that is based on 802.15.4. Unfortunately I cannot figure out the right DissectorTable name:
table = DissectorTable.get("wpan") -- wpan does not work
table:add(0, myProto) -- I'm unsure about the first argument here
What dissector table name do I have to use to create the described dissector? and what goes as a first argument for the add function?
Thanks in advance!
EDIT
I figured out that I have to do it this way:
table = DissectorTable.get("wtap_encap")
table:add(104, myProto)
where 104 stands for 802.15.4.
I found it by looking in wireshark -> internals -> dissector table
To add to Martin’s answer, you can also use the
wtaptable (which contains these integer constants) frominit.lualike so:From
/usr/share/wireshark/init.lua(Windows:%PROGRAMFILES%\Wireshark\init.lua) :