Merge branch 'vendor/LIBPCAP'
[dragonfly.git] / contrib / libpcap / pcap_list_tstamp_types.3pcap.in
1 .\"
2 .\" Copyright (c) 1994, 1996, 1997
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
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.
20 .\"
21 .TH PCAP_LIST_TSTAMP_TYPES 3PCAP "21 August 2010"
22 .SH NAME
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
25 .SH SYNOPSIS
26 .nf
27 .ft B
28 #include <pcap/pcap.h>
29 .ft
30 .LP
31 .ft B
32 int pcap_list_tstamp_types(pcap_t *p, int **tstamp_typesp);
33 void pcap_free_tstamp_types(int *tstamp_types);
34 .ft
35 .fi
36 .SH DESCRIPTION
37 .B 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 .B pcap_list_tstamp_types()
41 allocates an array to hold the list and sets
42 .I *tstamp_typesp
43 to point to the array.
44 See
45 .BR pcap-tstamp (@MAN_MISC_INFO@)
46 for a list of all the time stamp types.
47 .PP
48 The caller is responsible for freeing the array with
49 .BR pcap_free_tstamp_types() ,
50 which frees the list pointed to by
51 .IR tstamp_types .
52 .SH RETURN VALUE
53 .B pcap_list_tstamp_types()
54 returns the number of time stamp types in the array on success and
55 .B PCAP_ERROR
56 on failure.
57 A return value of zero means that you cannot specify a time stamp type;
58 you are limited to the capture device's default time stamp type.
59 If
60 .B PCAP_ERROR
61 is returned,
62 .B pcap_geterr()
63 or
64 .B pcap_perror()
65 may be called with
66 .I p
67 as an argument to fetch or display the error text.
68 .SH SEE ALSO
69 pcap(3PCAP), pcap_geterr(3PCAP), pcap_tstamp_type_val_to_name(3PCAP),
70 pcap-tstamp(@MAN_MISC_INFO@)