wireshark/test/lua
Hadriel Kaplan bd36fe1bcb Fix bug 6357: Lua all_field_infos() broken within tap/listener
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>
2014-02-25 21:06:50 +00:00
..
dissector.lua Adds some Lua helper functions: some commonly used functions, and to help troubleshooting Lua scripts 2014-02-25 21:06:21 +00:00
field.lua Add 4 more test scripts for Lua, and its own testsuite menu 2014-02-20 18:42:13 +00:00
globals_1.8.txt Add test suite for verifying Lua global variables/tables of previous releases have not disappeared. 2014-02-21 16:28:07 +00:00
globals_1.10.txt Add test suite for verifying Lua global variables/tables of previous releases have not disappeared. 2014-02-21 16:28:07 +00:00
inspect.lua Add test suite for verifying Lua global variables/tables of previous releases have not disappeared. 2014-02-21 16:28:07 +00:00
int64.lua Remove executable bit from a few files 2014-02-24 22:34:26 +00:00
listener.lua Fix bug 6357: Lua all_field_infos() broken within tap/listener 2014-02-25 21:06:50 +00:00
nstime.lua Add 4 more test scripts for Lua, and its own testsuite menu 2014-02-20 18:42:13 +00:00
pinfo.lua Add 4 more test scripts for Lua, and its own testsuite menu 2014-02-20 18:42:13 +00:00
proto.lua Fix bug 9790: Lua: wslua allows duplicate field registration 2014-02-21 20:57:43 +00:00
script_args.lua Remove executable bit from a few files 2014-02-24 22:34:26 +00:00
struct.lua Adds some Lua helper functions: some commonly used functions, and to help troubleshooting Lua scripts 2014-02-25 21:06:21 +00:00
verify_dissector.lua Add test suite for Lua dissector-related functions 2014-02-09 19:55:43 +00:00
verify_globals.lua Add test suite for verifying Lua global variables/tables of previous releases have not disappeared. 2014-02-21 16:28:07 +00:00