Find dissector table entry responsible for dissector call
I have a Lua dissector that I register in a considerable number of dissector table entries, like so:
local proto = Proto("fooproto", "fooproto")
-- dissector goes here...
DissectorTable.get("the_table"):add("whatiwant", proto)
DissectorTable.get("the_table"):add("somethingelse", proto)
-- and then some more table entries
My problem is that now proto:dissector
gets called, but I don't know which dissector table entry is responsible. The surrounding protocol dissector field structure makes it difficult to find this information.
For me it would be sufficient if I could register the dissectors with an optional argument like this
DissectorTable.get("the_table"):add("whatiwant", proto, {"whatiwant", "mux", "serdes"})
Where the table {"whatiwant", "mux", "serdes"}
would get passed to the dissector on every call in order to identify the responsible dissector table entry. Additional parameters to the DissectorTable's add method get ignored, however.
Is there a way to find which dissector table entry is responsible for calling a dissector?