aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-04-15 11:11:36 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-04-15 11:11:36 +0000
commitbacf81ff06eef90f8180aa8f46c7f20bc59f0c41 (patch)
tree92a888b0f0e32447852a6408b42d196817997256 /pcapio.c
parent587e0213eb0bf9f62f174f4ad706f0dfda864768 (diff)
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7048
Write timetamps for the interface statistic blocks the way specified by http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html svn path=/trunk/; revision=42080
Diffstat (limited to 'pcapio.c')
-rw-r--r--pcapio.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/pcapio.c b/pcapio.c
index 388a6cb62b..d399606fb1 100644
--- a/pcapio.c
+++ b/pcapio.c
@@ -698,16 +698,26 @@ libpcap_write_interface_statistics_block(FILE *fp,
}
if (isb_starttime !=0) {
+ guint32 high, low;
+
option.type = ISB_STARTTIME;
option.value_length = sizeof(guint64);
+ high = (guint32)((isb_starttime>>32) & 0xffffffff);
+ low = (guint32)(isb_starttime & 0xffffffff);
WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
- WRITE_DATA(fp, &isb_starttime, sizeof(guint64), *bytes_written, err);
+ WRITE_DATA(fp, &high, sizeof(guint32), *bytes_written, err);
+ WRITE_DATA(fp, &low, sizeof(guint32), *bytes_written, err);
}
if (isb_endtime !=0) {
+ guint32 high, low;
+
option.type = ISB_ENDTIME;
option.value_length = sizeof(guint64);
+ high = (guint32)((isb_endtime>>32) & 0xffffffff);
+ low = (guint32)(isb_endtime & 0xffffffff);
WRITE_DATA(fp, &option, sizeof(struct option), *bytes_written, err);
- WRITE_DATA(fp, &isb_endtime, sizeof(guint64), *bytes_written, err);
+ WRITE_DATA(fp, &high, sizeof(guint32), *bytes_written, err);
+ WRITE_DATA(fp, &low, sizeof(guint32), *bytes_written, err);
}
if (stats_retrieved) {
/* */