aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-24 21:31:56 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-24 21:31:56 +0000
commit6f43fbb2f088438dae20d4007df830863391b1c6 (patch)
tree7be99a00405385c14e1606c31906463d60107655 /plugins
parentef81f7d060f39b43cc8eadf86c8e965a3e820225 (diff)
EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mate/mate_runtime.c2
-rw-r--r--plugins/mgcp/packet-mgcp.c11
2 files changed, 3 insertions, 10 deletions
diff --git a/plugins/mate/mate_runtime.c b/plugins/mate/mate_runtime.c
index e314ab2216..362c8d3e31 100644
--- a/plugins/mate/mate_runtime.c
+++ b/plugins/mate/mate_runtime.c
@@ -847,7 +847,7 @@ extern void mate_analyze_frame(packet_info *pinfo, proto_tree* tree) {
mate_pdu* pdu = NULL;
mate_pdu* last = NULL;
- rd->now = (((float)pinfo->fd->rel_secs) + (((float)pinfo->fd->rel_usecs) / 1000000) );
+ rd->now = (float) nstime_to_sec(&pinfo->fd->rel_ts);
if ( tree->tree_data && tree->tree_data->interesting_hfids
&& rd->highest_analyzed_frame < pinfo->fd->num ) {
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c
index e811cd221c..12df9ecda9 100644
--- a/plugins/mgcp/packet-mgcp.c
+++ b/plugins/mgcp/packet-mgcp.c
@@ -1507,13 +1507,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
"This is a response to a request in frame %u",
mgcp_call->req_num);
PROTO_ITEM_SET_GENERATED(item);
- delta.secs= pinfo->fd->abs_secs-mgcp_call->req_time.secs;
- delta.nsecs=pinfo->fd->abs_usecs*1000-mgcp_call->req_time.nsecs;
- if (delta.nsecs<0)
- {
- delta.nsecs+=1000000000;
- delta.secs--;
- }
+ nstime_delta(&delta, &pinfo->fd->abs_ts, &mgcp_call->req_time);
item = proto_tree_add_time(tree, hf_mgcp_time, tvb, 0, 0, &delta);
PROTO_ITEM_SET_GENERATED(item);
}
@@ -1655,8 +1649,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
mgcp_call->rsp_num = 0;
mgcp_call->transid = mi->transid;
mgcp_call->responded = FALSE;
- mgcp_call->req_time.secs=pinfo->fd->abs_secs;
- mgcp_call->req_time.nsecs=pinfo->fd->abs_usecs*1000;
+ mgcp_call->req_time=pinfo->fd->abs_ts;
strcpy(mgcp_call->code,mi->code);
/* Store it */