1PCAP_LIST_TSTAMP_TYPES(3PCAP)                    PCAP_LIST_TSTAMP_TYPES(3PCAP)
2
3
4

NAME

6       pcap_list_tstamp_types,  pcap_free_tstamp_types  -  get  a list of time
7       stamp types supported by a capture device, and free that list
8

SYNOPSIS

10       #include <pcap/pcap.h>
11
12       int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
13       void pcap_free_tstamp_types(int *tstamp_types);
14

DESCRIPTION

16       pcap_list_tstamp_types() is used to get a list of  the  supported  time
17       stamp  types  of  the  interface  associated  with the pcap descriptor.
18       pcap_list_tstamp_types() allocates an array to hold the list  and  sets
19       *tstamp_typesp to point to the array.  See pcap-tstamp(7) for a list of
20       all the time stamp types.
21
22       The   caller   is   responsible   for   freeing    the    array    with
23       pcap_free_tstamp_types(),   which   frees   the   list  pointed  to  by
24       tstamp_types.
25

RETURN VALUE

27       pcap_list_tstamp_types() returns the number of time stamp types in  the
28       array  on  success  and  PCAP_ERROR  on failure.  A return value of one
29       means that the only time stamp type supported is the one in  the  list,
30       which  is the capture device's default time stamp type.  A return value
31       of  zero  means  that  the  only   time   stamp   type   supported   is
32       PCAP_TSTAMP_HOST, which is the capture device's default time stamp type
33       (only older versions of libpcap will return that; newer  versions  will
34       always   return  one  or  more  types).   If  PCAP_ERROR  is  returned,
35       pcap_geterr(3PCAP) or pcap_perror(3PCAP) may be called  with  p  as  an
36       argument to fetch or display the error text.
37

BACKWARD COMPATIBILITY

39       These functions became available in libpcap release 1.2.1.  In previous
40       releases, the time stamp type cannot be  set;  only  the  default  time
41       stamp type offered by a capture source is available.
42

SEE ALSO

44       pcap(3PCAP), pcap_tstamp_type_val_to_name(3PCAP), pcap-tstamp(7)
45
46
47
48                               8 September 2019  PCAP_LIST_TSTAMP_TYPES(3PCAP)
Impressum