Jiri Engelthaler <engycz[AT]gmail.com>
Stephen Ludin <sludin[AT]ludin.org>
Andreas Urke <andurke[AT]gmail.com>
+RobiOneKenobi <robionekenobi[AT]bluewin.ch>
Dan Lasley <dlasley[AT]promus.com> gave permission for his
dumpit() hex-dump routine to be used.
const char *string;
nstime_t time_stamp;
guint32 tmpsecs;
+ guint64 todsecs;
gboolean length_error;
/* there is a possibility here that we might raise an exception
time_stamp.nsecs = 0;
break;
+ case ENC_TIME_TOD|ENC_BIG_ENDIAN:
+ /*
+ * TOD time stamp, big-endian.
+ */
+/* XXX - where should this go? */
+#define TOD_BASETIME 2208988800ul
+
+ todsecs = tvb_get_ntoh64(tvb, start) >> 12;
+ time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME;
+ time_stamp.nsecs = (todsecs % 1000000) * 1000;
+ break;
+
+ case ENC_TIME_TOD|ENC_LITTLE_ENDIAN:
+ /*
+ * TOD time stamp, big-endian.
+ */
+ todsecs = tvb_get_letoh64(tvb, start) >> 12 ;
+ time_stamp.secs = (todsecs / 1000000) - TOD_BASETIME;
+ time_stamp.nsecs = (todsecs % 1000000) * 1000;
+ break;
+
case ENC_TIME_NTP|ENC_BIG_ENDIAN:
/*
* NTP time stamp, big-endian.
*/
#define ENC_TIME_TIMESPEC 0x00000000
#define ENC_TIME_NTP 0x00000002
+#define ENC_TIME_TOD 0x00000004
/*
* Historically, the only place the representation mattered for strings