aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.h
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-02-07 03:31:40 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-02-07 03:31:40 +0000
commit8fc6e28b6a6be6e4d335424352118a33c2033315 (patch)
tree888b1cdfb3c526c6f42ac39df8141f888a5ebe7e /epan/proto.h
parent4c44a66e4330ada9e7d1a5af08b2838ed5210f7c (diff)
Add support for passing NTP times to proto_tree_add_item() by specifying
an encoding of ENC_TIME_NTP. This increases the number of decimal places shown for NTP times (from 6 to 9), so round the value to the nearest microsecond. (I can't tell if NTP times are ever more precise than a microsecond--this rounding is mainly to be closer to the old behavior.) Use proto_tree_add_item() for some NTP times. svn path=/trunk/; revision=35840
Diffstat (limited to 'epan/proto.h')
-rw-r--r--epan/proto.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/proto.h b/epan/proto.h
index 3e67b7a33e..6dc5f70425 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -205,6 +205,13 @@ typedef struct _protocol protocol_t;
*/
#define ENC_BIG_ENDIAN 0x00000000
#define ENC_LITTLE_ENDIAN 0x80000000
+/* Historically FT_TIMEs were only timespecs, the only question was whether
+ * they were stored in big- or little-endian format. These macros use the
+ * big/little-endian values for backwards compatibility.
+ */
+#define ENC_TIME_TIMESPEC_BE ENC_BIG_ENDIAN
+#define ENC_TIME_TIMESPEC_LE ENC_LITTLE_ENDIAN
+#define ENC_TIME_NTP 0x00000002
#define ENC_NA 0x00000000