We support nanosecond resolution in Wiretap; use that with AIX libpcap

files.

svn path=/trunk/; revision=20338
This commit is contained in:
Guy Harris 2007-01-08 02:55:41 +00:00
parent e456b4fcd6
commit 0e89a5617f
1 changed files with 3 additions and 6 deletions

View File

@ -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) {