Wireshark-commits: [Wireshark-commits] master dd00264: Add tvb_get and proto_tree_add for string-en
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=dd002649c32a0f16720236b34fe5a7aefe04c457
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark
Commits:
dd00264 by Hadriel Kaplan (hadrielk@xxxxxxxxx):
Add tvb_get and proto_tree_add for string-encoded timestamps
This commit adds tvb_get_string_time and proto_tree_add_time_item routines for
getting nstime fields from the tvb when they are encoded in ASCII string form.
The proto_tree_add_time_item routine is also usable for normal
big/little-endian encoded time_t, and has the advantage of retrieving
the value even if there's no proto tree.
It also exposes the routines to Lua, both so that a Lua script can take
advantage of this, but also so I can write a testsuite to test the functions.
Change-Id: I955da10f68f2680e3da3a5be5ad8fdce7ed6808c
Reviewed-on: https://code.wireshark.org/review/1084
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 92b5013 Enhance translation (rename also pixel => Pixel to avoid similar string...)
adds dd00264 Add tvb_get and proto_tree_add for string-encoded timestamps
Summary of changes:
epan/proto.c | 387 ++++++++++++++++++++-----------
epan/proto.h | 63 +++++
epan/tvbuff.c | 291 ++++++++++++++++++++++++
epan/tvbuff.h | 32 +++
epan/wslua/wslua_tree.c | 135 ++++++++++-
epan/wslua/wslua_tvb.c | 48 ++--
test/lua/tvb.lua | 582 +++++++++++++++++++++++++++++++++++++++++++++++
test/suite-wslua.sh | 17 ++
tools/checkAPIs.pl | 2 +-
wsutil/nstime.h | 2 +-
10 files changed, 1400 insertions(+), 159 deletions(-)
create mode 100644 test/lua/tvb.lua