aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-21 20:48:30 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-07-21 20:48:30 +0000
commit5d52e1673483c6ed146ced3c7c086594c0a484ac (patch)
tree88ca0347d8bbadce7fd02036e5b5a2c34887ac31 /epan/epan.c
parenta66a717d46af19111dbde3dc9e72a2bd32734692 (diff)
Add helper function to epan_session which can be used to get absolute timestamp of given frame.
Remove ->prev_cap, for testing purpose also replace ->prev_dis with number of previously displayed frame number. This patch reduce size of frame_data by 8B (amd64) This is what (I think) was suggested by Guy in comment 13 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5821#c13) svn path=/trunk/; revision=50765
Diffstat (limited to 'epan/epan.c')
-rw-r--r--epan/epan.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c
index 276caf6a68..e3a0b2bb17 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -146,6 +146,20 @@ epan_new(void)
return session;
}
+const nstime_t *
+epan_get_frame_ts(const epan_t *session, guint32 frame_num)
+{
+ nstime_t *abs_ts = NULL;
+
+ if (session->get_frame_ts)
+ abs_ts = session->get_frame_ts(session->data, frame_num);
+
+ if (!abs_ts)
+ g_warning("!!! couldn't get frame ts for %u !!!\n", frame_num);
+
+ return abs_ts;
+}
+
void
epan_free(epan_t *session)
{