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  de‐
17       sired for packets captured on the pcap descriptor to the type specified
18       by tstamp_precision.  It must be called on a pcap descriptor created by
19       pcap_create(3PCAP)  that  has  not  yet  been  activated  by pcap_acti‐
20       vate(3PCAP).  Two time stamp precisions are supported, microseconds and
21       nanoseconds.   One  can  use  options  PCAP_TSTAMP_PRECISION_MICRO  and
22       PCAP_TSTAMP_PRECISION_NANO to request desired  precision.  By  default,
23       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