summaryrefslogtreecommitdiff
path: root/wsutil/nstime.h
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-04-12 00:32:20 -0400
committerAnders Broman <a.broman58@gmail.com>2014-04-14 11:47:39 +0000
commitdd002649c32a0f16720236b34fe5a7aefe04c457 (patch)
treed03bdc6f0f5ac36bb2d43a68f0cc8bcb72c27c3a /wsutil/nstime.h
parent92b501303bdeb163cec55825da8b683138517e4d (diff)
downloadwireshark-dd002649c32a0f16720236b34fe5a7aefe04c457.tar.gz
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@gmail.com>
Diffstat (limited to 'wsutil/nstime.h')
-rw-r--r--wsutil/nstime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsutil/nstime.h b/wsutil/nstime.h
index 8def5de250..3222ed18ba 100644
--- a/wsutil/nstime.h
+++ b/wsutil/nstime.h
@@ -36,7 +36,7 @@ extern "C" {
*/
/** data structure to hold time values with nanosecond resolution*/
-typedef struct {
+typedef struct nstime_t {
time_t secs;
int nsecs;
} nstime_t;