Ask Your Question

Revision history [back]

How do you pass arguments to subdissectors in Lua?

I have one Lua dissector that calls a subdissector, as so:

second_dissector = Dissector.get("second_dissector")
range = tvbuf:range(hdr_size)
newtvb = range:tvb()
num_bytes = second_dissector:call(newtvb, pktinfo, root)

The dissector call works so far, but not I want to pass an additional argument to the subdissector (a value I dissected in the outer dissector). How do I do this? I've tried adding a fourth argument to my dissector call, but that did not work.