summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-02-04 21:06:01 -0800
committerGuy Harris <guy@alum.mit.edu>2015-02-05 17:42:36 -0800
commit16201f0efa312cca04a8e5044ffedf1734f30580 (patch)
tree8ce28f1276e8fe7b61c54704e36feb645b470107
parentdbe655b363865b84a97f818c2217d4477d8bb0cb (diff)
downloadlibpcap-16201f0efa312cca04a8e5044ffedf1734f30580.tar.gz
Document the time stamp precision-related routines.
-rw-r--r--pcap-tstamp.manmisc.in45
1 files changed, 44 insertions, 1 deletions
diff --git a/pcap-tstamp.manmisc.in b/pcap-tstamp.manmisc.in
index f86f8332..6cb066c9 100644
--- a/pcap-tstamp.manmisc.in
+++ b/pcap-tstamp.manmisc.in
@@ -125,8 +125,51 @@ Time stamp provided by the network adapter on which the capture is being
done. This is a high-precision time stamp; it is not synchronized with
the host operating system's clock.
.RE
+.LP
+By default, when performing a live capture or reading from a savefile,
+time stamps are supplied as seconds since January 1, 1970, 00:00:00 UTC,
+and microseconds since that seconds value, even if higher-resolution
+time stamps are available from the capture device or in the savefile.
+If, when reading a savefile, the time stamps in the file have a higher
+resolution than one microsecond, the additional digits of resolution are
+discarded.
+.LP
+The
+.BR pcap_set_tstamp_precision (3PCAP)
+routine can be used after a
+.B pcap_create()
+call and after a
+.B pcap_activate()
+call to specify the resolution of the time stamps to get for the device.
+If the hardware or software cannot supply a higher-resolution time
+stamp, the
+.B pcap_set_tstamp_precision()
+call will fail, and the time stamps supplied after the
+.B pcap_activate()
+call will have microsecond resolution.
+.LP
+When opening a savefile, the
+.BR pcap_open_offline_with_tstamp_precision (3PCAP)
+and
+.BR pcap_fopen_offline_with_tstamp_precision (3PCAP)
+routines can be used to specify the resolution of time stamps to be read
+from the file; if the time stamps in the file have a lower resolution,
+the fraction-of-a-second portion of the time stamps will be scaled to
+the specified resolution.
+.LP
+The
+.BR pcap_get_tstamp_precision (3PCAP)
+routine returns the resolution of time stamps that will be supplied;
+when capturing packets, this does not reflect the actual precision of
+the time stamp supplied by the hardware or operating system and, when
+reading a savefile, this does not indicate the actual precision of time
+stamps in the file.
.SH SEE ALSO
pcap_set_tstamp_type(3PCAP),
pcap_list_tstamp_types(3PCAP),
pcap_tstamp_type_val_to_name(3PCAP),
-pcap_tstamp_type_name_to_val(3PCAP)
+pcap_tstamp_type_name_to_val(3PCAP),
+pcap_set_tstamp_precision(3PCAP),
+pcap_open_offline_with_tstamp_precision(3PCAP),
+pcap_fopen_offline_with_tstamp_precision(3PCAP),
+pcap_get_tstamp_precision(3PCAP)