1999-06-19 01:47:43 +00:00
|
|
|
/* timestamp.h
|
|
|
|
* Defines for packet timestamps
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
1999-06-19 01:47:43 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
1999-06-19 01:47:43 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
1999-06-19 01:47:43 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
1999-06-19 01:47:43 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TIMESTAMP_H__
|
|
|
|
#define __TIMESTAMP_H__
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Type of time-stamp shown in the summary display.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2006-12-05 03:19:51 +00:00
|
|
|
TS_RELATIVE, /* Since start of capture */
|
2004-01-19 03:46:43 +00:00
|
|
|
TS_ABSOLUTE,
|
|
|
|
TS_ABSOLUTE_WITH_DATE,
|
2007-03-23 18:08:17 +00:00
|
|
|
TS_DELTA, /* Since previous captured packet */
|
|
|
|
TS_DELTA_DIS, /* Since previous displayed packet */
|
2006-12-05 03:19:51 +00:00
|
|
|
TS_EPOCH, /* Seconds (and fractions) since epoch */
|
2011-07-04 21:43:34 +00:00
|
|
|
TS_UTC,
|
|
|
|
TS_UTC_WITH_DATE,
|
2006-12-05 03:19:51 +00:00
|
|
|
|
2004-01-19 23:03:20 +00:00
|
|
|
/*
|
2006-05-22 08:14:01 +00:00
|
|
|
* Special value used for the command-line setting in Wireshark, to indicate
|
2004-01-19 23:03:20 +00:00
|
|
|
* that no value has been set from the command line.
|
|
|
|
*/
|
2005-08-25 21:29:54 +00:00
|
|
|
TS_NOT_SET
|
|
|
|
} ts_type;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TS_PREC_AUTO, /* recent */
|
|
|
|
TS_PREC_FIXED_SEC, /* recent and internal */
|
|
|
|
TS_PREC_FIXED_DSEC, /* recent and internal */
|
|
|
|
TS_PREC_FIXED_CSEC, /* recent and internal */
|
2010-05-06 10:32:59 +00:00
|
|
|
TS_PREC_FIXED_MSEC, /* recent and internal */
|
2005-08-25 21:29:54 +00:00
|
|
|
TS_PREC_FIXED_USEC, /* recent and internal */
|
|
|
|
TS_PREC_FIXED_NSEC, /* recent and internal */
|
|
|
|
TS_PREC_AUTO_SEC, /* internal */
|
|
|
|
TS_PREC_AUTO_DSEC, /* internal */
|
|
|
|
TS_PREC_AUTO_CSEC, /* internal */
|
|
|
|
TS_PREC_AUTO_MSEC, /* internal */
|
|
|
|
TS_PREC_AUTO_USEC, /* internal */
|
|
|
|
TS_PREC_AUTO_NSEC /* internal */
|
|
|
|
} ts_precision;
|
|
|
|
|
2010-05-06 10:32:59 +00:00
|
|
|
typedef enum {
|
|
|
|
TS_SECONDS_DEFAULT, /* recent */
|
|
|
|
TS_SECONDS_HOUR_MIN_SEC,/* recent */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Special value used for the command-line setting in Wireshark, to indicate
|
|
|
|
* that no value has been set from the command line.
|
|
|
|
*/
|
|
|
|
TS_SECONDS_NOT_SET
|
|
|
|
} ts_seconds_type;
|
|
|
|
|
2005-08-25 21:29:54 +00:00
|
|
|
extern ts_type timestamp_get_type(void);
|
|
|
|
extern void timestamp_set_type(ts_type);
|
2004-01-19 03:46:43 +00:00
|
|
|
|
2005-08-25 21:29:54 +00:00
|
|
|
extern int timestamp_get_precision(void);
|
|
|
|
extern void timestamp_set_precision(int tsp);
|
2004-01-19 03:46:43 +00:00
|
|
|
|
2010-05-06 10:32:59 +00:00
|
|
|
extern ts_seconds_type timestamp_get_seconds_type(void);
|
|
|
|
extern void timestamp_set_seconds_type(ts_seconds_type);
|
|
|
|
|
1999-06-19 01:47:43 +00:00
|
|
|
#endif /* timestamp.h */
|