|
Packit |
209cc3 |
.\"Copyright (c) 2013, Michal Sekletar
|
|
Packit |
209cc3 |
.\"All rights reserved.
|
|
Packit |
209cc3 |
.\"
|
|
Packit |
209cc3 |
.\"Redistribution and use in source and binary forms, with or without
|
|
Packit |
209cc3 |
.\"modification, are permitted provided that the following conditions
|
|
Packit |
209cc3 |
.\"are met:
|
|
Packit |
209cc3 |
.\"
|
|
Packit |
209cc3 |
.\" 1. Redistributions of source code must retain the above copyright
|
|
Packit |
209cc3 |
.\" notice, this list of conditions and the following disclaimer.
|
|
Packit |
209cc3 |
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
Packit |
209cc3 |
.\" notice, this list of conditions and the following disclaimer in
|
|
Packit |
209cc3 |
.\" the documentation and/or other materials provided with the
|
|
Packit |
209cc3 |
.\" distribution.
|
|
Packit |
209cc3 |
.\" 3. The names of the authors may not be used to endorse or promote
|
|
Packit |
209cc3 |
.\" products derived from this software without specific prior
|
|
Packit |
209cc3 |
.\" written permission.
|
|
Packit |
209cc3 |
.\"
|
|
Packit |
209cc3 |
.\"THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
|
Packit |
209cc3 |
.\"IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
|
Packit |
209cc3 |
.\"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
Packit |
209cc3 |
|
|
Packit |
209cc3 |
.TH PCAP_SET_TSTAMP_PRECISION 3PCAP "5 February 2015"
|
|
Packit |
209cc3 |
.SH NAME
|
|
Packit |
209cc3 |
pcap_set_tstamp_precision \- set the time stamp precision returned in
|
|
Packit |
209cc3 |
captures
|
|
Packit |
209cc3 |
.SH SYNOPSIS
|
|
Packit |
209cc3 |
.nf
|
|
Packit |
209cc3 |
.ft B
|
|
Packit |
209cc3 |
#include <pcap/pcap.h>
|
|
Packit |
209cc3 |
.ft
|
|
Packit |
209cc3 |
.LP
|
|
Packit |
209cc3 |
.ft B
|
|
Packit |
209cc3 |
int pcap_set_tstamp_precision(pcap_t *p, int tstamp_precision);
|
|
Packit |
209cc3 |
.ft
|
|
Packit |
209cc3 |
.fi
|
|
Packit |
209cc3 |
.SH DESCRIPTION
|
|
Packit |
209cc3 |
.B pcap_set_tstamp_precision()
|
|
Packit |
209cc3 |
sets the precision of the time stamp desired for packets captured on the pcap
|
|
Packit |
209cc3 |
descriptor to the type specified by
|
|
Packit |
209cc3 |
.IR tstamp_precision .
|
|
Packit |
209cc3 |
It must be called on a pcap descriptor created by
|
|
Packit |
209cc3 |
.B pcap_create(3PCAP)
|
|
Packit |
209cc3 |
that has not yet been activated by
|
|
Packit |
209cc3 |
.BR pcap_activate(3PCAP) .
|
|
Packit |
209cc3 |
Two time stamp precisions are supported, microseconds and nanoseconds. One can
|
|
Packit |
209cc3 |
use options
|
|
Packit |
209cc3 |
.B PCAP_TSTAMP_PRECISION_MICRO and
|
|
Packit |
209cc3 |
.B PCAP_TSTAMP_PRECISION_NANO
|
|
Packit |
209cc3 |
to request desired precision. By default, time stamps are in microseconds.
|
|
Packit |
209cc3 |
.SH RETURN VALUE
|
|
Packit |
209cc3 |
.B pcap_set_tstamp_precision()
|
|
Packit |
209cc3 |
returns 0 on success if the specified time stamp precision is expected to be
|
|
Packit |
209cc3 |
supported by the capture device,
|
|
Packit |
209cc3 |
.B PCAP_ERROR_TSTAMP_PRECISION_NOTSUP
|
|
Packit |
209cc3 |
if the capture device does not support the requested time stamp
|
|
Packit |
209cc3 |
precision,
|
|
Packit |
209cc3 |
.B PCAP_ERROR_ACTIVATED
|
|
Packit |
209cc3 |
if called on a capture handle that has been activated.
|
|
Packit |
209cc3 |
.SH BACKWARD COMPATIBILITY
|
|
Packit |
209cc3 |
This function became available in libpcap release 1.5.1. In previous
|
|
Packit |
209cc3 |
releases, time stamps from a capture device or savefile are always given
|
|
Packit |
209cc3 |
in seconds and microseconds.
|
|
Packit |
209cc3 |
.SH SEE ALSO
|
|
Packit |
209cc3 |
pcap(3PCAP),
|
|
Packit |
209cc3 |
pcap_get_tstamp_precision(3PCAP),
|
|
Packit |
209cc3 |
pcap-tstamp(@MAN_MISC_INFO@)
|