From 54b733ce9a0d1cd4ab9b142479368a5e696360be Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 28 Sep 2014 11:37:06 -0700 Subject: 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 --- epan/frame_data.c | 1 + 1 file changed, 1 insertion(+) (limited to 'epan/frame_data.c') diff --git a/epan/frame_data.c b/epan/frame_data.c index bf403684f1..bfce771779 100644 --- a/epan/frame_data.c +++ b/epan/frame_data.c @@ -311,6 +311,7 @@ frame_data_init(frame_data *fdata, guint32 num, fdata->flags.has_ts = (phdr->presence_flags & WTAP_HAS_TS) ? 1 : 0; fdata->flags.has_phdr_comment = (phdr->opt_comment != NULL); fdata->flags.has_user_comment = 0; + fdata->tsprec = (gint16)phdr->pkt_tsprec; fdata->color_filter = NULL; fdata->abs_ts.secs = phdr->ts.secs; fdata->abs_ts.nsecs = phdr->ts.nsecs; -- cgit v1.2.1