I'm attempting to build my first LUA dissector. Specifically I'm writing something to decode PWE3 ControlWords (RFC4385) in more detail than the default one. The dissector I've written works fine but I need to pass the payload to an ethernet dissector.
https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Proto.html 11.3 indicates that this should be possible
In another blog I found I should use a call of the form: DissectorTable.get("mpls.label"):get_dissector(2097):call(buffer(4):tvb(), pinfo, tree)
But this just gives me LUA errors "attempt to index a null value"
I tried this:
local my_table = DissectorTable.list()
for k,v in pairs(my_table) do print(k.." = "..v) end
Which proved that the Dissector Table has entries
And this :
local my_dissectors = Dissector.list()
for k,v in pairs(my_dissectors) do print(k.." = "..v) end
Which shows: ... 2097 = pw_eth_nocw ...
So I think I must be pretty close.
Any help would be much appreciated
end