aboutsummaryrefslogtreecommitdiffstats
path: root/epan/timestamp.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-09-28 11:37:06 -0700
committerGuy Harris <guy@alum.mit.edu>2014-09-28 18:38:18 +0000
commit54b733ce9a0d1cd4ab9b142479368a5e696360be (patch)
tree1c98ec83c70ba99b383105516048d0254168d855 /epan/timestamp.h
parentefea8ce1c6a4331bc2ff7090dd3dadd2a80f6d86 (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 'epan/timestamp.h')
-rw-r--r--epan/timestamp.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/epan/timestamp.h b/epan/timestamp.h
index bbda35e64c..25a048ab90 100644
--- a/epan/timestamp.h
+++ b/epan/timestamp.h
@@ -52,19 +52,13 @@ typedef enum {
} ts_type;
typedef enum {
- TS_PREC_AUTO, /* recent */
- TS_PREC_FIXED_SEC, /* recent and internal */
- TS_PREC_FIXED_DSEC, /* recent and internal */
- TS_PREC_FIXED_CSEC, /* recent and internal */
- TS_PREC_FIXED_MSEC, /* recent and internal */
- TS_PREC_FIXED_USEC, /* recent and internal */
- TS_PREC_FIXED_NSEC, /* recent and internal */
- TS_PREC_AUTO_SEC, /* internal */
- TS_PREC_AUTO_DSEC, /* internal */
- TS_PREC_AUTO_CSEC, /* internal */
- TS_PREC_AUTO_MSEC, /* internal */
- TS_PREC_AUTO_USEC, /* internal */
- TS_PREC_AUTO_NSEC /* internal */
+ TS_PREC_AUTO,
+ TS_PREC_FIXED_SEC,
+ TS_PREC_FIXED_DSEC,
+ TS_PREC_FIXED_CSEC,
+ TS_PREC_FIXED_MSEC,
+ TS_PREC_FIXED_USEC,
+ TS_PREC_FIXED_NSEC
} ts_precision;
typedef enum {