diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-09-28 11:37:06 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-09-28 18:38:18 +0000 |
commit | 54b733ce9a0d1cd4ab9b142479368a5e696360be (patch) | |
tree | 1c98ec83c70ba99b383105516048d0254168d855 /wiretap/wtap-int.h | |
parent | efea8ce1c6a4331bc2ff7090dd3dadd2a80f6d86 (diff) |
Make the time stamp resolution per-packet.
Pcap-ng files don't have a per-file time stamp resolution, they have a
per-interface time stamp resolution. Add new time stamp resolution
types of "unknown" and "per-packet", add the time stamp resolution to
struct wtap_pkthdr, have the libwiretap core initialize it to the
per-file time stamp resolution, and have pcap-ng do the same thing with
the resolution that it does with the packet encapsulation.
Get rid of the TS_PREC_AUTO_XXX values; just have TS_PREC_AUTO, which
means "use the packet's resolution to determine how many significant
digits to display". Rename all the WTAP_FILE_TSPREC_XXX values to
WTAP_TSPREC_XXX, as they're also used for per-packet values.
Change-Id: If9fd8f799b19836a5104aaa0870a951498886c69
Reviewed-on: https://code.wireshark.org/review/4349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index dfa3441835..fa95119dfe 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -68,10 +68,18 @@ struct wtap { int file_encap; /* per-file, for those * file formats that have * per-file encapsulation - * types + * types rather than per-packet + * encapsulation types */ - int tsprecision; /* timestamp precision of the lower 32bits - * e.g. WTAP_FILE_TSPREC_USEC + int file_tsprec; /* per-file timestamp precision + * of the fractional part of + * the time stamp, for those + * file formats that have + * per-file timestamp + * precision rather than + * per-packet timestamp + * precision + * e.g. WTAP_TSPREC_USEC */ wtap_new_ipv4_callback_t add_new_ipv4; wtap_new_ipv6_callback_t add_new_ipv6; @@ -105,7 +113,7 @@ struct wtap_dumper { subtype_close_func subtype_close; int tsprecision; /**< timestamp precision of the lower 32bits - * e.g. WTAP_FILE_TSPREC_USEC + * e.g. WTAP_TSPREC_USEC */ addrinfo_lists_t *addrinfo_lists; /**< Struct containing lists of resolved addresses */ struct wtapng_section_s *shb_hdr; |