forked from osmocom/wireshark
bd36fe1bcb
The current API for Lua provides a global function "all_field_infos()" which returns all the populated field_info nodes in the current proto_tree. By default all_field_infos() "works", in the literal sense: it returns exactly the fields the previous dissectors of the packet have populated at that instant of time. But of course dissectors don't populate all the applicable fields most of the time, because of the TRY_TO_FAKE_THIS_ITEM optimization where they don't fill in things that aren't needed at the time by a display, color, or tap's dfilter. So this commit offers a way to force the dissectors to populate all the applicable field_infos in the tree, by setting the proto_tree to be visible. Obviously that is going to impact performance, since it basically bypasses the TRY_TO_FAKE_THIS_ITEM optimization; so the patch only does this if the Lua script author told it to explicitly, by adding an argument to Listener.new() and register_postdissector(). Change-Id: I11d3559fbe8c14fbadf1b51415a3701dc1200b7b Reviewed-on: https://code.wireshark.org/review/286 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> |
||
---|---|---|
.. | ||
dissector.lua | ||
field.lua | ||
globals_1.8.txt | ||
globals_1.10.txt | ||
inspect.lua | ||
int64.lua | ||
listener.lua | ||
nstime.lua | ||
pinfo.lua | ||
proto.lua | ||
script_args.lua | ||
struct.lua | ||
verify_dissector.lua | ||
verify_globals.lua |