aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-01-08 02:55:41 +0000
committerGuy Harris <guy@alum.mit.edu>2007-01-08 02:55:41 +0000
commit0e89a5617ffee0c24e5f4e99c0c6307ebe2cee19 (patch)
treea2973f46f1a3a8cce7d9aa8efcfe04955f8d6633 /wiretap/libpcap.c
parente456b4fcd62fadab5c78d94913ec408a4926279b (diff)
We support nanosecond resolution in Wiretap; use that with AIX libpcap
files. svn path=/trunk/; revision=20338
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index e1f6c67dc2..d348ee27e5 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -867,9 +867,11 @@ int libpcap_open(wtap *wth, int *err, gchar **err_info)
*/
if (aix) {
/*
- * Yes. Skip all the tests for other mutant formats.
+ * Yes. Skip all the tests for other mutant formats,
+ * and set the precision to nanosecond precision.
*/
wth->file_type = WTAP_FILE_PCAP_AIX;
+ wth->tsprecision = WTAP_FILE_TSPREC_NSEC;
return 1;
}
@@ -1596,11 +1598,6 @@ adjust_header(wtap *wth, struct pcaprec_hdr *hdr)
hdr->orig_len = BSWAP32(hdr->orig_len);
}
- /* If this is AIX, convert the time stamp from seconds/nanoseconds
- to seconds/microseconds. */
- if (wth->file_type == WTAP_FILE_PCAP_AIX)
- hdr->ts_usec = hdr->ts_usec/1000;
-
/* Swap the "incl_len" and "orig_len" fields, if necessary. */
switch (wth->capture.pcap->lengths_swapped) {