2 .\" Copyright (c) 1994, 1996, 1997
3 .\" The Regents of the University of California. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that: (1) source code distributions
7 .\" retain the above copyright notice and this paragraph in its entirety, (2)
8 .\" distributions including binary code include the above copyright notice and
9 .\" this paragraph in its entirety in the documentation or other materials
10 .\" provided with the distribution, and (3) all advertising materials mentioning
11 .\" features or use of this software display the following acknowledgement:
12 .\" ``This product includes software developed by the University of California,
13 .\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 .\" the University nor the names of its contributors may be used to endorse
15 .\" or promote products derived from this software without specific prior
16 .\" written permission.
17 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 .TH PCAP_LIST_TSTAMP_TYPES 3PCAP "8 September 2019"
23 pcap_list_tstamp_types, pcap_free_tstamp_types \- get a list of time
24 stamp types supported by a capture device, and free that list
28 #include <pcap/pcap.h>
32 int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
33 void pcap_free_tstamp_types(int *tstamp_types);
37 .BR pcap_list_tstamp_types ()
38 is used to get a list of the supported time stamp types of the interface
39 associated with the pcap descriptor.
40 .BR pcap_list_tstamp_types ()
41 allocates an array to hold the list and sets
43 to point to the array.
45 .BR \%pcap-tstamp (@MAN_MISC_INFO@)
46 for a list of all the time stamp types.
48 The caller is responsible for freeing the array with
49 .BR pcap_free_tstamp_types (),
50 which frees the list pointed to by
53 .BR pcap_list_tstamp_types ()
54 returns the number of time stamp types in the array on success and
57 A return value of one means that the only time stamp type supported is
58 the one in the list, which is the capture device's default time stamp
59 type. A return value of zero means that the only time stamp type
61 .BR PCAP_TSTAMP_HOST ,
62 which is the capture device's default time stamp type (only older
63 versions of libpcap will return that; newer versions will always return
68 .BR pcap_geterr (3PCAP)
70 .BR pcap_perror (3PCAP)
73 as an argument to fetch or display the error text.
74 .SH BACKWARD COMPATIBILITY
76 These functions became available in libpcap release 1.2.1. In previous
77 releases, the time stamp type cannot be set; only the default time stamp
78 type offered by a capture source is available.
81 .BR pcap_tstamp_type_val_to_name (3PCAP),
82 .BR \%pcap-tstamp (@MAN_MISC_INFO@)