summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-icmp.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-03-24 18:05:10 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-03-24 18:05:10 +0000
commit9493ebe8e94f191eaf25ae4c11691de2e14901cf (patch)
tree0de04fa4fe2670516fe324ae115dc2897868af2f /epan/dissectors/packet-icmp.c
parentb9331456e9790982747c89ed22fd02cb5dcb4ab1 (diff)
downloadwireshark-9493ebe8e94f191eaf25ae4c11691de2e14901cf.tar.gz
Display the value of the ICMP echo request/reply response time in milliseconds.
svn path=/trunk/; revision=36313
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r--epan/dissectors/packet-icmp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index b2b0393abc..1fa2bbe410 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -762,6 +762,7 @@ static void transaction_end(packet_info *pinfo, proto_tree *tree, guint32 *key)
emem_tree_key_t icmp_key[2];
proto_item *it;
nstime_t ns;
+ double resptime;
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
pinfo->ptype, 0, 0, 0);
@@ -792,7 +793,9 @@ static void transaction_end(packet_info *pinfo, proto_tree *tree, guint32 *key)
PROTO_ITEM_SET_GENERATED(it);
nstime_delta(&ns, &pinfo->fd->abs_ts, &icmp_trans->rqst_time);
- it = proto_tree_add_time(tree, hf_icmp_resptime, NULL, 0, 0, &ns);
+ resptime = 1000.0 * ns.secs + ns.nsecs/1000000.0;
+ it = proto_tree_add_double_format_value(tree, hf_icmp_resptime,
+ NULL, 0, 0, resptime, "%f ms", resptime);
PROTO_ITEM_SET_GENERATED(it);
}
@@ -1237,8 +1240,8 @@ proto_register_icmp(void)
"This is the response to the request in this frame", HFILL }},
{ &hf_icmp_resptime,
- { "Response Time", "icmp.resptime", FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
- "The time between the request and the response", HFILL }}
+ { "Response Time", "icmp.resptime", FT_DOUBLE, BASE_NONE, NULL, 0x0,
+ "The time between the request and the response, in ms.", HFILL }}
};
static gint *ett[] = {