diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-10 01:54:51 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-14 07:29:15 +0000 |
commit | 04c39bb0972bac1f95eb9394b5ca1086f19c0d93 (patch) | |
tree | 62171e4584b86bb746d6a73181eb7627a15b9e44 /epan/wslua/wslua_tvb.c | |
parent | a59ac1bd10d29d05ca5cd657b7c64ab13a08670d (diff) |
Add Lua heuristic dissector support
This adds the ability for Lua scripts to register heuristic dissectors
for any protocol that has registered a heuristic dissector list, such
as UDP, TCP, and ~50 others. The Lua function can also establish a
conversation tied to its Proto dissector, to avoid having to check the
heuristics for the same flow. The example dissector in the testsuite
has also been enhanced to include a heuristic dissector, to verify
the functionality and provide an example implementation.
Change-Id: Ie232602779f43d3418fe8db09c61d5fc0b59597a
Reviewed-on: https://code.wireshark.org/review/576
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/wslua/wslua_tvb.c')
-rw-r--r-- | epan/wslua/wslua_tvb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index c4746bc97f..1dae9c3461 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -495,7 +495,7 @@ static int Tvb__gc(lua_State* L) { } WSLUA_METHOD Tvb_reported_len(lua_State* L) { - /* Obtain the reported length of a TVB */ + /* Obtain the reported (not captured) length of a TVB */ Tvb tvb = checkTvb(L,1); lua_pushnumber(L,tvb_reported_length(tvb->ws_tvb)); @@ -503,7 +503,7 @@ WSLUA_METHOD Tvb_reported_len(lua_State* L) { } WSLUA_METHOD Tvb_len(lua_State* L) { - /* Obtain the length of a TVB */ + /* Obtain the actual (captured) length of a TVB */ Tvb tvb = checkTvb(L,1); lua_pushnumber(L,tvb_length(tvb->ws_tvb)); @@ -511,7 +511,7 @@ WSLUA_METHOD Tvb_len(lua_State* L) { } WSLUA_METHOD Tvb_reported_length_remaining(lua_State* L) { - /* Obtain the reported length of packet data to end of a TVB or -1 if the offset is beyond the end of the TVB */ + /* Obtain the reported (not captured) length of packet data to end of a TVB or -1 if the offset is beyond the end of the TVB */ #define Tvb_reported_length_remaining_OFFSET 2 /* offset */ Tvb tvb = checkTvb(L,1); int offset = luaL_optint(L, Tvb_reported_length_remaining_OFFSET, 0); |