diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 20:48:30 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-21 20:48:30 +0000 |
commit | 5d52e1673483c6ed146ced3c7c086594c0a484ac (patch) | |
tree | 88ca0347d8bbadce7fd02036e5b5a2c34887ac31 /epan/wslua/wslua_pinfo.c | |
parent | a66a717d46af19111dbde3dc9e72a2bd32734692 (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/wslua/wslua_pinfo.c')
-rw-r--r-- | epan/wslua/wslua_pinfo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c index 6bea086517..f542e46047 100644 --- a/epan/wslua/wslua_pinfo.c +++ b/epan/wslua/wslua_pinfo.c @@ -1006,11 +1006,11 @@ lua_nstime_to_sec(const nstime_t *nstime) } static double -lua_delta_nstime_to_sec(const frame_data *fd, const frame_data *prev) +lua_delta_nstime_to_sec(const Pinfo pinfo, const frame_data *fd, guint32 prev_num) { nstime_t del; - frame_delta_abs_time(fd, prev, &del); + frame_delta_abs_time(pinfo->ws_pinfo->epan, fd, prev_num, &del); return lua_nstime_to_sec(&del); } @@ -1023,8 +1023,8 @@ PINFO_GET_NUMBER(Pinfo_len,pinfo->ws_pinfo->fd->pkt_len) PINFO_GET_NUMBER(Pinfo_caplen,pinfo->ws_pinfo->fd->cap_len) PINFO_GET_NUMBER(Pinfo_abs_ts,lua_nstime_to_sec(&pinfo->ws_pinfo->fd->abs_ts)) PINFO_GET_NUMBER(Pinfo_rel_ts,lua_nstime_to_sec(&pinfo->ws_pinfo->fd->rel_ts)) -PINFO_GET_NUMBER(Pinfo_delta_ts,lua_delta_nstime_to_sec(pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->prev_cap)) -PINFO_GET_NUMBER(Pinfo_delta_dis_ts,lua_delta_nstime_to_sec(pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->prev_dis)) +PINFO_GET_NUMBER(Pinfo_delta_ts,lua_delta_nstime_to_sec(pinfo, pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->num - 1)) +PINFO_GET_NUMBER(Pinfo_delta_dis_ts,lua_delta_nstime_to_sec(pinfo, pinfo->ws_pinfo->fd, pinfo->ws_pinfo->fd->prev_dis_num)) PINFO_GET_NUMBER(Pinfo_ipproto,pinfo->ws_pinfo->ipproto) PINFO_GET_NUMBER(Pinfo_circuit_id,pinfo->ws_pinfo->circuit_id) PINFO_GET_NUMBER(Pinfo_desegment_len,pinfo->ws_pinfo->desegment_len) |