forked from osmocom/wireshark
Temporarily get rid of the "struct tm" in "struct observer_time", and
get rid of the reference to its "tm_gmtoff" member - there are platforms on which Ethereal runs that don't have "tm_gmtoff" in "struct tm". If the time stamp in the packets is nanoseconds since midnight 2001-01-01 *local* time, we'd need to compute the offset between that and midnight 2000-01-01 GMT, and adjust the time with that. svn path=/trunk/; revision=8842
This commit is contained in:
parent
4c858d1ae7
commit
1131dafe62
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: network_instruments.c,v 1.1 2003/10/31 00:43:21 guy Exp $
|
||||
* $Id: network_instruments.c,v 1.2 2003/10/31 08:06:24 guy Exp $
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -172,7 +172,11 @@ static gboolean observer_read(wtap *wth, int *err, long *data_offset)
|
|||
GUINT64_FROM_LE(packet_header.nano_seconds_since_2000);
|
||||
fill_time_struct(packet_header.nano_seconds_since_2000, &packet_time);
|
||||
useconds = (long)(packet_time.useconds_from_1970 - ((guint64)packet_time.seconds_from_1970)*1000000);
|
||||
#if 0
|
||||
seconds = (long)packet_time.seconds_from_1970 - packet_time.time_stamp.tm_gmtoff;
|
||||
#else
|
||||
seconds = (long)packet_time.seconds_from_1970;
|
||||
#endif
|
||||
|
||||
/* set-up the packet header */
|
||||
packet_header.network_size =
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: network_instruments.h,v 1.1 2003/10/31 00:43:21 guy Exp $
|
||||
* $Id: network_instruments.h,v 1.2 2003/10/31 08:06:25 guy Exp $
|
||||
*/
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -72,7 +72,9 @@ typedef struct tlv_user_commnent
|
|||
typedef struct observer_time
|
||||
{
|
||||
guint64 ns_since2000; /* given in packet_entry_header */
|
||||
#if 0
|
||||
struct tm time_stamp;
|
||||
#endif
|
||||
|
||||
guint64 us_since2000; /* Micro-Seconds since 1-1-2000 */
|
||||
guint64 sec_since2000; /* Seconds since 1-1-2000 */
|
||||
|
|
Loading…
Reference in New Issue