I'm dealing with two custom protocols that use the same GRE protocol type. Each protocol currently has a separate Lua dissector (I'd like to keep it this way). I'm writing a script in Lua to perform some heuristics to determine which of the custom protocols is being used, with the idea that I'll pass the packet off to the appropriate Lua dissector. I've got all of the heuristics written, but I can't quite figure how to call a dissector written in Lua from another dissector written in Lua. Do I need to create a new DissectorTable? How are the (final) two dissectors referenced ( Thanks. asked 11 Feb '13, 16:15 krach09 edited 11 Feb '13, 18:13 helloworld |
One Answer:
You should use From similar question:
answered 11 Feb '13, 18:11 helloworld edited 11 Feb '13, 18:17 |
Since I am dealing with multiple custom protocols on top of the same GRE protocol type, how do I register all of the LUA dissectors at the same time without them conflicting?
You just need to use unique names for the dissectors in their
Proto
declarations (this is a requirement anyway).They are all using unique names. But if I have the following listed in init.lua:
dofile("file0.lua")
dofile("file1.lua")
dofile("file2.lua")
How does Wireshark know that file0.lua contains the logic to determine wether file1.lua or file2.lua should be used as the dissector?
I figured it out ... thanks.
Hi,
I am facing a similar issue. Can you please explain.