* dissection of the next packet occurs.
*/
const char *
-ntp_fmt_ts(const guint8 *reftime)
+tvb_ntp_fmt_ts(tvbuff_t *tvb, gint offset)
{
guint32 tempstmp, tempfrac;
time_t temptime;
double fractime;
char *buff;
- tempstmp = pntohl(&reftime[0]);
- tempfrac = pntohl(&reftime[4]);
+ tempstmp = tvb_get_ntohl(tvb, offset);
+ tempfrac = tvb_get_ntohl(tvb, offset+4);
if ((tempstmp == 0) && (tempfrac == 0)) {
return "NULL";
}
#define NTP_BASETIME 2208988800ul
#define NTP_TS_SIZE 100
-extern const char * ntp_fmt_ts(const guint8 *reftime);
+extern const char *tvb_ntp_fmt_ts(tvbuff_t *tvb, gint offset);
#endif
proto_tree_add_item(PoC1_tree, hf_rtcp_app_poc1_request_ts,
tvb, offset, 8, ENC_TIME_NTP|ENC_BIG_ENDIAN);
- buff = ntp_fmt_ts(tvb_get_ptr(tvb, offset, 8));
+ buff = tvb_ntp_fmt_ts(tvb, offset);
offset += 8;
packet_len -=8;