aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-01-18 02:18:39 +0000
committerGuy Harris <guy@alum.mit.edu>2003-01-18 02:18:39 +0000
commitb0e2e98ec8dba653c680f94063e33d404713ad79 (patch)
tree6ee8ccc1a157e0cdff3ba40b20ab45be1b5c0183
parenteeb05c3b1c74404b2f4ae750e92debf74e2ac05e (diff)
downloadwireshark-b0e2e98ec8dba653c680f94063e33d404713ad79.tar.gz
wireshark-b0e2e98ec8dba653c680f94063e33d404713ad79.tar.bz2
wireshark-b0e2e98ec8dba653c680f94063e33d404713ad79.zip
Rename OUT_DATE to OUT_TIMESECS, as it can be used for relative time in
seconds as well as for UNIX-style date/time stamps. FT_ABSOLUTE_TIME fields don't have a base, so use BASE_NONE. Make hf_afs_fs_callback_expires an FT_RELATIVE_TIME, as it's a relative time not an absolute UNIX time. svn path=/trunk/; revision=6937
-rw-r--r--packet-afs-macros.h38
-rw-r--r--packet-afs-register-info.h30
-rw-r--r--packet-afs.c12
3 files changed, 41 insertions, 39 deletions
diff --git a/packet-afs-macros.h b/packet-afs-macros.h
index 1807322ff6..b7ed67320d 100644
--- a/packet-afs-macros.h
+++ b/packet-afs-macros.h
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs-macros.h,v 1.21 2002/10/11 21:58:25 guy Exp $
+ * $Id: packet-afs-macros.h,v 1.22 2003/01/18 02:18:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -98,8 +98,10 @@
offset += 8; \
}
-/* Output a UNIX seconds-only timestamp, after converting to an nstime_t */
-#define OUT_DATE(field) \
+/* Output a seconds-only time value, after converting to an nstime_t;
+ this can be an absolute time as a UNIX time-since-epoch, or a
+ relative time in seconds */
+#define OUT_TIMESECS(field) \
{ nstime_t ts; \
ts.secs = tvb_get_ntohl(tvb, offset); \
ts.nsecs = 0; \
@@ -148,7 +150,7 @@
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_callback); \
OUT_UINT(hf_afs_fs_callback_version); \
- OUT_DATE(hf_afs_fs_callback_expires); \
+ OUT_TIMESECS(hf_afs_fs_callback_expires); \
OUT_UINT(hf_afs_fs_callback_type); \
tree = save; \
}
@@ -160,7 +162,7 @@
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_callback); \
OUT_UINT(hf_afs_cb_callback_version); \
- OUT_DATE(hf_afs_cb_callback_expires); \
+ OUT_TIMESECS(hf_afs_cb_callback_expires); \
OUT_UINT(hf_afs_cb_callback_type); \
tree = save; \
}
@@ -247,7 +249,7 @@
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_status); \
OUT_FS_STATUSMASK(); \
- OUT_DATE(hf_afs_fs_status_clientmodtime); \
+ OUT_TIMESECS(hf_afs_fs_status_clientmodtime); \
OUT_UINT(hf_afs_fs_status_owner); \
OUT_UINT(hf_afs_fs_status_group); \
OUT_UINT(hf_afs_fs_status_mode); \
@@ -275,8 +277,8 @@
OUT_UINT(hf_afs_fs_status_parentvnode); \
OUT_UINT(hf_afs_fs_status_parentunique); \
OUT_UINT(hf_afs_fs_status_segsize); \
- OUT_DATE(hf_afs_fs_status_clientmodtime); \
- OUT_DATE(hf_afs_fs_status_servermodtime); \
+ OUT_TIMESECS(hf_afs_fs_status_clientmodtime); \
+ OUT_TIMESECS(hf_afs_fs_status_servermodtime); \
OUT_UINT(hf_afs_fs_status_group); \
OUT_UINT(hf_afs_fs_status_synccounter); \
OUT_UINT(hf_afs_fs_status_dataversionhigh); \
@@ -293,7 +295,7 @@
"VolSync"); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_volsync); \
- OUT_DATE(hf_afs_fs_volsync_spare1); \
+ OUT_TIMESECS(hf_afs_fs_volsync_spare1); \
OUT_UINT(hf_afs_fs_volsync_spare2); \
OUT_UINT(hf_afs_fs_volsync_spare3); \
OUT_UINT(hf_afs_fs_volsync_spare4); \
@@ -424,19 +426,19 @@
#define OUT_UBIK_DebugOld() \
{ \
- OUT_DATE(hf_afs_ubik_now); \
- OUT_DATE(hf_afs_ubik_lastyestime); \
+ OUT_TIMESECS(hf_afs_ubik_now); \
+ OUT_TIMESECS(hf_afs_ubik_lastyestime); \
OUT_IP(hf_afs_ubik_lastyeshost); \
OUT_UINT(hf_afs_ubik_lastyesstate); \
- OUT_DATE(hf_afs_ubik_lastyesclaim); \
+ OUT_TIMESECS(hf_afs_ubik_lastyesclaim); \
OUT_IP(hf_afs_ubik_lowesthost); \
- OUT_DATE(hf_afs_ubik_lowesttime); \
+ OUT_TIMESECS(hf_afs_ubik_lowesttime); \
OUT_IP(hf_afs_ubik_synchost); \
- OUT_DATE(hf_afs_ubik_synctime); \
+ OUT_TIMESECS(hf_afs_ubik_synctime); \
OUT_UBIKVERSION("Sync Version"); \
OUT_UBIKVERSION("Sync TID"); \
OUT_UINT(hf_afs_ubik_amsyncsite); \
- OUT_DATE(hf_afs_ubik_syncsiteuntil); \
+ OUT_TIMESECS(hf_afs_ubik_syncsiteuntil); \
OUT_UINT(hf_afs_ubik_nservers); \
OUT_UINT(hf_afs_ubik_lockedpages); \
OUT_UINT(hf_afs_ubik_writelockedpages); \
@@ -448,14 +450,14 @@
OUT_UINT(hf_afs_ubik_recoverystate); \
OUT_UINT(hf_afs_ubik_currenttrans); \
OUT_UINT(hf_afs_ubik_writetrans); \
- OUT_DATE(hf_afs_ubik_epochtime); \
+ OUT_TIMESECS(hf_afs_ubik_epochtime); \
}
#define OUT_UBIK_SDebugOld() \
{ \
OUT_IP(hf_afs_ubik_addr); \
- OUT_DATE(hf_afs_ubik_lastvotetime); \
- OUT_DATE(hf_afs_ubik_lastbeaconsent); \
+ OUT_TIMESECS(hf_afs_ubik_lastvotetime); \
+ OUT_TIMESECS(hf_afs_ubik_lastbeaconsent); \
OUT_UINT(hf_afs_ubik_lastvote); \
OUT_UBIKVERSION("Remote Version"); \
OUT_UINT(hf_afs_ubik_currentdb); \
diff --git a/packet-afs-register-info.h b/packet-afs-register-info.h
index 198771c911..749b2dd52b 100644
--- a/packet-afs-register-info.h
+++ b/packet-afs-register-info.h
@@ -8,10 +8,10 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs-register-info.h,v 1.14 2002/08/28 21:00:07 jmayer Exp $
+ * $Id: packet-afs-register-info.h,v 1.15 2003/01/18 02:18:39 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-tftp.c
@@ -134,7 +134,7 @@
{ &hf_afs_fs_volname, { "Volume Name", "afs.fs.volname",
FT_STRING, BASE_HEX, 0, 0, "Volume Name", HFILL }},
{ &hf_afs_fs_timestamp, { "Timestamp", "afs.fs.timestamp",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Timestamp", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Timestamp", HFILL }},
{ &hf_afs_fs_offlinemsg, { "Offline Message", "afs.fs.offlinemsg",
FT_STRING, BASE_HEX, 0, 0, "Volume Name", HFILL }},
{ &hf_afs_fs_motd, { "Message of the Day", "afs.fs.motd",
@@ -176,9 +176,9 @@
FT_BOOLEAN, 32, 0, 0x00000400, "FSync", HFILL }},
{ &hf_afs_fs_status_clientmodtime, { "Client Modification Time", "afs.fs.status.clientmodtime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Client Modification Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Client Modification Time", HFILL }},
{ &hf_afs_fs_status_servermodtime, { "Server Modification Time", "afs.fs.status.servermodtime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Server Modification Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Server Modification Time", HFILL }},
{ &hf_afs_fs_status_owner, { "Owner", "afs.fs.status.owner",
FT_UINT32, BASE_DEC, 0, 0, "Owner", HFILL }},
{ &hf_afs_fs_status_group, { "Group", "afs.fs.status.group",
@@ -220,7 +220,7 @@
{ &hf_afs_fs_volsync_spare1, { "Volume Creation Timestamp", "afs.fs.volsync.spare1",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Volume Creation Timestamp", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Volume Creation Timestamp", HFILL }},
{ &hf_afs_fs_volsync_spare2, { "Spare 2", "afs.fs.volsync.spare2",
FT_UINT32, BASE_DEC, 0, 0, "Spare 2", HFILL }},
{ &hf_afs_fs_volsync_spare3, { "Spare 3", "afs.fs.volsync.spare3",
@@ -266,7 +266,7 @@
{ &hf_afs_fs_callback_version, { "Version", "afs.fs.callback.version",
FT_UINT32, BASE_DEC, 0, 0, "Version", HFILL }},
{ &hf_afs_fs_callback_expires, { "Expires", "afs.fs.callback.expires",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Expires", HFILL }},
+ FT_RELATIVE_TIME, BASE_NONE, 0, 0, "Expires", HFILL }},
{ &hf_afs_fs_callback_type, { "Type", "afs.fs.callback.type",
FT_UINT32, BASE_DEC, VALS(cb_types), 0, "Type", HFILL }},
@@ -320,13 +320,13 @@
{ &hf_afs_bos_host, { "Host", "afs.bos.host",
FT_STRING, BASE_HEX, 0, 0, "Host", HFILL }},
{ &hf_afs_bos_newtime, { "New Time", "afs.bos.newtime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "New Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "New Time", HFILL }},
{ &hf_afs_bos_baktime, { "Backup Time", "afs.bos.baktime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Backup Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Backup Time", HFILL }},
{ &hf_afs_bos_oldtime, { "Old Time", "afs.bos.oldtime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Old Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Old Time", HFILL }},
{ &hf_afs_bos_keymodtime, { "Key Modification Time", "afs.bos.keymodtime",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Key Modification Time", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Key Modification Time", HFILL }},
{ &hf_afs_bos_keychecksum, { "Key Checksum", "afs.bos.keychecksum",
FT_UINT32, BASE_DEC, 0, 0, "Key Checksum", HFILL }},
{ &hf_afs_bos_keyspare2, { "Key Spare 2", "afs.bos.keyspare2",
@@ -439,7 +439,7 @@
{ &hf_afs_cb_callback_version, { "Version", "afs.cb.callback.version",
FT_UINT32, BASE_DEC, 0, 0, "Version", HFILL }},
{ &hf_afs_cb_callback_expires, { "Expires", "afs.cb.callback.expires",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Expires", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Expires", HFILL }},
{ &hf_afs_cb_callback_type, { "Type", "afs.cb.callback.type",
FT_UINT32, BASE_DEC, VALS(cb_types), 0, "Type", HFILL }},
{ &hf_afs_cb_fid_volume, { "FileID (Volume)", "afs.cb.fid.volume",
@@ -481,13 +481,13 @@
{ &hf_afs_ubik_state, { "State", "afs.ubik.state",
FT_UINT32, BASE_HEX, 0, 0, "State", HFILL }},
{ &hf_afs_ubik_version_epoch, { "Epoch", "afs.ubik.version.epoch",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Epoch", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Epoch", HFILL }},
{ &hf_afs_ubik_version_counter, { "Counter", "afs.ubik.version.counter",
FT_UINT32, BASE_DEC, 0, 0, "Counter", HFILL }},
{ &hf_afs_ubik_votestart, { "Vote Started", "afs.ubik.votestart",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Vote Started", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Vote Started", HFILL }},
{ &hf_afs_ubik_voteend, { "Vote Ends", "afs.ubik.voteend",
- FT_ABSOLUTE_TIME, BASE_DEC, 0, 0, "Vote Ends", HFILL }},
+ FT_ABSOLUTE_TIME, BASE_NONE, 0, 0, "Vote Ends", HFILL }},
{ &hf_afs_ubik_file, { "File", "afs.ubik.file",
FT_UINT32, BASE_DEC, 0, 0, "File", HFILL }},
{ &hf_afs_ubik_pos, { "Position", "afs.ubik.position",
diff --git a/packet-afs.c b/packet-afs.c
index 2c22f08f1a..f80e0ffda7 100644
--- a/packet-afs.c
+++ b/packet-afs.c
@@ -8,7 +8,7 @@
* Portions based on information/specs retrieved from the OpenAFS sources at
* www.openafs.org, Copyright IBM.
*
- * $Id: packet-afs.c,v 1.51 2002/11/28 03:57:49 guy Exp $
+ * $Id: packet-afs.c,v 1.52 2003/01/18 02:18:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -590,7 +590,7 @@ dissect_fs_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int off
break;
case 160: /* get xstats */
OUT_UINT(hf_afs_fs_xstats_version);
- OUT_DATE(hf_afs_fs_xstats_timestamp);
+ OUT_TIMESECS(hf_afs_fs_xstats_timestamp);
OUT_FS_AFS_CollData();
break;
case 162: /* flush cps */
@@ -861,9 +861,9 @@ dissect_bos_reply(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *tree, int of
/* no output */
break;
case 107: /* get dates */
- OUT_DATE(hf_afs_bos_newtime);
- OUT_DATE(hf_afs_bos_baktime);
- OUT_DATE(hf_afs_bos_oldtime);
+ OUT_TIMESECS(hf_afs_bos_newtime);
+ OUT_TIMESECS(hf_afs_bos_baktime);
+ OUT_TIMESECS(hf_afs_bos_oldtime);
break;
case 108: /* exec */
/* no output */
@@ -1587,7 +1587,7 @@ dissect_ubik_request(tvbuff_t *tvb, struct rxinfo *rxinfo _U_, proto_tree *tree,
{
case 10000: /* vote-beacon */
OUT_UINT(hf_afs_ubik_state);
- OUT_DATE(hf_afs_ubik_votestart);
+ OUT_TIMESECS(hf_afs_ubik_votestart);
OUT_UBIKVERSION("DB Version");
OUT_UBIKVERSION("TID");
break;