aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.c
diff options
context:
space:
mode:
authordarkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7>2011-04-23 09:13:16 +0000
committerdarkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7>2011-04-23 09:13:16 +0000
commit633d7a8cabfb06aeb9fc2a63ec783e45afce4d12 (patch)
tree8536f2903d9eef75029c1d6f5516d858bb58e03d /epan/dissectors/packet-frame.c
parent25b9695f86bf4244ab20767e6f7280f86385083a (diff)
Use orginal nsstime_t structures (without copying).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36829 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index b9021aa574..617b3709dd 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -119,7 +119,6 @@ static void
dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
{
proto_item *volatile ti = NULL;
- nstime_t ts;
guint cap_len = 0, frame_len = 0;
proto_tree *volatile tree;
proto_item *item;
@@ -213,38 +212,30 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
fh_tree = proto_item_add_subtree(ti, ett_frame);
- ts = pinfo->fd->abs_ts;
-
proto_tree_add_time(fh_tree, hf_frame_arrival_time, tvb,
- 0, 0, &ts);
- if(ts.nsecs < 0 || ts.nsecs >= 1000000000) {
+ 0, 0, &(pinfo->fd->abs_ts));
+ if(pinfo->fd->abs_ts.nsecs < 0 || pinfo->fd->abs_ts.nsecs >= 1000000000) {
item = proto_tree_add_none_format(fh_tree, hf_frame_time_invalid, tvb,
- 0, 0, "Arrival Time: Fractional second %09ld is invalid, the valid range is 0-1000000000", (long) ts.nsecs);
+ 0, 0, "Arrival Time: Fractional second %09ld is invalid, the valid range is 0-1000000000", (long) pinfo->fd->abs_ts.nsecs);
PROTO_ITEM_SET_GENERATED(item);
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Arrival Time: Fractional second out of range (0-1000000000)");
}
if(generate_epoch_time) {
proto_tree_add_time(fh_tree, hf_frame_arrival_time_epoch, tvb,
- 0, 0, &ts);
+ 0, 0, &(pinfo->fd->abs_ts));
}
- ts = pinfo->fd->del_cap_ts;
-
item = proto_tree_add_time(fh_tree, hf_frame_time_delta, tvb,
- 0, 0, &ts);
+ 0, 0, &(pinfo->fd->del_cap_ts));
PROTO_ITEM_SET_GENERATED(item);
- ts = pinfo->fd->del_dis_ts;
-
item = proto_tree_add_time(fh_tree, hf_frame_time_delta_displayed, tvb,
- 0, 0, &ts);
+ 0, 0, &(pinfo->fd->del_dis_ts));
PROTO_ITEM_SET_GENERATED(item);
- ts = pinfo->fd->rel_ts;
-
item = proto_tree_add_time(fh_tree, hf_frame_time_relative, tvb,
- 0, 0, &ts);
+ 0, 0, &(pinfo->fd->rel_ts));
PROTO_ITEM_SET_GENERATED(item);
if(pinfo->fd->flags.ref_time){