aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/btsnoop.c
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 /wiretap/btsnoop.c
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 'wiretap/btsnoop.c')
-rw-r--r--wiretap/btsnoop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/btsnoop.c b/wiretap/btsnoop.c
index 6d3e75a2c6..fa0075b847 100644
--- a/wiretap/btsnoop.c
+++ b/wiretap/btsnoop.c
@@ -155,7 +155,7 @@ int btsnoop_open(wtap *wth, int *err, gchar **err_info)
wth->subtype_seek_read = btsnoop_seek_read;
wth->file_encap = file_encap;
wth->snapshot_length = 0; /* not available in header */
- wth->tsprecision = WTAP_FILE_TSPREC_USEC;
+ wth->file_tsprec = WTAP_TSPREC_USEC;
wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_BTSNOOP;
return 1;
}
@@ -420,7 +420,7 @@ gboolean btsnoop_dump_open_h1(wtap_dumper *wdh, int *err)
switch (wdh->file_type_subtype) {
case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP:
- wdh->tsprecision = WTAP_FILE_TSPREC_USEC;
+ wdh->tsprecision = WTAP_TSPREC_USEC;
break;
default:
@@ -462,7 +462,7 @@ gboolean btsnoop_dump_open_h4(wtap_dumper *wdh, int *err)
switch (wdh->file_type_subtype) {
case WTAP_FILE_TYPE_SUBTYPE_BTSNOOP:
- wdh->tsprecision = WTAP_FILE_TSPREC_USEC;
+ wdh->tsprecision = WTAP_TSPREC_USEC;
break;
default: