1
2PCAP_SET_TSTAMP_PRECISION(3PCAP)              PCAP_SET_TSTAMP_PRECISION(3PCAP)
3
4
5

NAME

7       pcap_set_tstamp_precision  -  set  the time stamp precision returned in
8       captures
9

SYNOPSIS

11       #include <pcap/pcap.h>
12
13       int pcap_set_tstamp_precision(pcap_t *p, int tstamp_precision);
14

DESCRIPTION

16       pcap_set_tstamp_precision()  sets  the  precision  of  the  time  stamp
17       desired  for packets captured on the pcap descriptor to the type speci‐
18       fied by tstamp_precision.  It must be called on a pcap descriptor  cre‐
19       ated   by  pcap_create(3PCAP)  that  has  not  yet  been  activated  by
20       pcap_activate(3PCAP).   Two  time  stamp  precisions   are   supported,
21       microseconds  and  nanoseconds.  One can use options PCAP_TSTAMP_PRECI‐
22       SION_MICRO and PCAP_TSTAMP_PRECISION_NANO to request desired precision.
23       By default, time stamps are in microseconds.
24

RETURN VALUE

26       pcap_set_tstamp_precision()  returns 0 on success if the specified time
27       stamp precision is expected to be  supported  by  the  capture  device,
28       PCAP_ERROR_TSTAMP_PRECISION_NOTSUP  if the capture device does not sup‐
29       port the requested time stamp precision, PCAP_ERROR_ACTIVATED if called
30       on a capture handle that has been activated.
31

BACKWARD COMPATIBILITY

33       This  function  became available in libpcap release 1.5.1.  In previous
34       releases, time stamps from a capture  device  or  savefile  are  always
35       given in seconds and microseconds.
36

SEE ALSO

38       pcap(3PCAP), pcap_get_tstamp_precision(3PCAP), pcap-tstamp(7)
39
40
41
42                                23 August 2018PCAP_SET_TSTAMP_PRECISION(3PCAP)
Impressum