diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-01-08 02:55:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-01-08 02:55:41 +0000 |
commit | 0e89a5617ffee0c24e5f4e99c0c6307ebe2cee19 (patch) | |
tree | a2973f46f1a3a8cce7d9aa8efcfe04955f8d6633 | |
parent | e456b4fcd62fadab5c78d94913ec408a4926279b (diff) |
We support nanosecond resolution in Wiretap; use that with AIX libpcap
files.
svn path=/trunk/; revision=20338
-rw-r--r-- | wiretap/libpcap.c | 9 |
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) { |