aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-browse.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-07-13 00:27:51 +0000
committerGuy Harris <guy@alum.mit.edu>2001-07-13 00:27:51 +0000
commit82a553e9c9275c9074b087b63e976ef63259dba9 (patch)
tree0e927a409742b23966e99c28e279e65874270290 /packet-smb-browse.c
parent01710d371c7c599952ea49eae49451e68b837e32 (diff)
Add a "time_msecs_to_str()" routine, to turn a time interval, expressed
as a 32-bit number of milliseconds, to a descriptive string. Use that in the MS Browser dissector. svn path=/trunk/; revision=3708
Diffstat (limited to 'packet-smb-browse.c')
-rw-r--r--packet-smb-browse.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/packet-smb-browse.c b/packet-smb-browse.c
index bb90d3cd57..23dc783ecf 100644
--- a/packet-smb-browse.c
+++ b/packet-smb-browse.c
@@ -2,7 +2,7 @@
* Routines for SMB Browser packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-smb-browse.c,v 1.10 2001/07/13 00:01:35 guy Exp $
+ * $Id: packet-smb-browse.c,v 1.11 2001/07/13 00:27:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -539,6 +539,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
guint8 server_count;
int i;
guint32 criterion;
+ guint32 uptime;
if (!proto_is_protocol_enabled(proto_smb_browse)) {
return FALSE;
@@ -578,9 +579,8 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
periodicity = tvb_get_letohl(tvb, offset);
proto_tree_add_uint_format(tree, hf_periodicity, tvb, offset, 4,
periodicity,
- "Update Periodicity: %u.%03u sec",
- periodicity/1000,
- periodicity%1000);
+ "Update Periodicity: %s",
+ time_msecs_to_str(periodicity));
offset += 4;
/* server name */
@@ -686,7 +686,11 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
offset += 4;
/* server uptime */
- proto_tree_add_item(tree, hf_server_uptime, tvb, offset, 4, TRUE);
+ uptime = tvb_get_letohl(tvb, offset);
+ proto_tree_add_uint_format(tree, hf_server_uptime,
+ tvb, offset, 4, uptime,
+ "Uptime: %s",
+ time_msecs_to_str(uptime));
offset += 4;
/* next 4 bytes must be zero */