diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-25 18:11:05 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-26 05:20:17 +0000 |
commit | da1af6e549856c8e213dadc1ec37a41a50246e1d (patch) | |
tree | e6f34ec2c6f02d6aca698dd94899e74e917ab7ea /epan/wslua/template-init.lua | |
parent | b981173669401ff8c325edf8a4ade816acb32020 (diff) |
Add filterable expert info for Lua
This adds the ability for a Lua script to register expert info fields,
similar to C-code dissectors. This change also removes the need for
the expert_add_info_format_internal() function. Existing Lua scripts
do not have to change, because the existing expert info function
uses the internal "_ws.lua" protocol instead of nothing; but using
the new functionality provides more benefits since it correctly
registers the expert info fields to the dissector's protocol.
The test suite was amended to generate both old and new forms.
Change-Id: Ib5ae74e927cfa81312baf7b04ff4104b0b4f936e
Reviewed-on: https://code.wireshark.org/review/830
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/wslua/template-init.lua')
-rw-r--r-- | epan/wslua/template-init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua index a80dc74023..0a9ad0d00d 100644 --- a/epan/wslua/template-init.lua +++ b/epan/wslua/template-init.lua @@ -64,6 +64,7 @@ function typeof(obj) return mt and mt.__typeof or obj.__typeof or type(obj) end +-- the following function is since 1.11.3 function file_exists(name) local f = io.open(name,"r") if f ~= nil then io.close(f) return true else return false end @@ -77,6 +78,7 @@ end -- %FT_TYPES% +-- the following table is since 1.11.3 -- %WTAP_PRESENCE_FLAGS% -- %BASES% @@ -85,6 +87,9 @@ end -- %EXPERT% +-- the following table is since 1.11.3 +-- %EXPERT_TABLE% + -- %MENU_GROUPS% -- other useful constants |