blob: 261c315200c01c2f25feec8a719569e9f565ef02 [file] [log] [blame]
JP Abgrall511eca32014-02-12 13:46:45 -08001.\"
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_SET_TSTAMP_TYPE 3PCAP "21 August 2010"
22.SH NAME
23pcap_set_tstamp_type \- set the time stamp type to be used by a
24capture device
25.SH SYNOPSIS
26.nf
27.ft B
28#include <pcap/pcap.h>
29.ft
30.LP
31.ft B
32int pcap_set_tstamp_type(pcap_t *p, int tstamp_type);
33.ft
34.fi
35.SH DESCRIPTION
36.B pcap_set_tstamp_type()
37sets the the type of time stamp desired for packets captured on the pcap
38descriptor to the type specified by
39.IR tstamp_type .
40It must be called on a pcap descriptor created by
41.B pcap_create()
42that has not yet been activated by
43.BR pcap_activate() .
44.B pcap_list_tstamp_types()
45will give a list of the time stamp types supported by a given capture
46device.
47See
48.BR pcap-tstamp (@MAN_MISC_INFO@)
49for a list of all the time stamp types.
50.SH RETURN VALUE
51.B pcap_set_tstamp_type()
52returns 0 on success if the specified time stamp type is expected to be
53supported by the capture device,
54.B PCAP_WARNING_TSTAMP_TYPE_NOTSUP
55on success if the specified time stamp type is not supported by the
56capture device,
57.B PCAP_ERROR_ACTIVATED
58if called on a capture handle that has been activated, and
59.B PCAP_ERROR_CANTSET_TSTAMP_TYPE
60if the capture device doesn't support setting the time stamp type.
61.SH SEE ALSO
62pcap(3PCAP),
63pcap_list_tstamp_types(3PCAP),
64pcap_tstamp_type_name_to_val(3PCAP),
65pcap-tstamp(@MAN_MISC_INFO@)