2021-11-26 03:31:05 +00:00
|
|
|
/** @file
|
1999-06-19 01:47:43 +00:00
|
|
|
* Defines for packet timestamps
|
|
|
|
*
|
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
|
|
|
|
*
|
2018-02-08 16:59:17 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
1999-06-19 01:47:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TIMESTAMP_H__
|
|
|
|
#define __TIMESTAMP_H__
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
|
|
|
|
2011-12-29 00:08:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1999-06-19 01:47:43 +00:00
|
|
|
/*
|
|
|
|
* 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 */
|
2013-11-06 20:39:09 +00:00
|
|
|
TS_ABSOLUTE, /* Local absolute time, without date */
|
|
|
|
TS_ABSOLUTE_WITH_YMD, /* Local absolute time, with date in YYYY-MM-DD form */
|
|
|
|
TS_ABSOLUTE_WITH_YDOY, /* Local absolute time, with date in YYYY DOY form */
|
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 */
|
2013-11-06 20:39:09 +00:00
|
|
|
TS_UTC, /* UTC absolute time, without date */
|
|
|
|
TS_UTC_WITH_YMD, /* UTC absolute time, with date in YYYY-MM-DD form */
|
|
|
|
TS_UTC_WITH_YDOY, /* UTC absolute time, with date in YYYY DOY form */
|
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 {
|
2014-09-28 18:37:06 +00:00
|
|
|
TS_PREC_AUTO,
|
|
|
|
TS_PREC_FIXED_SEC,
|
|
|
|
TS_PREC_FIXED_DSEC,
|
|
|
|
TS_PREC_FIXED_CSEC,
|
|
|
|
TS_PREC_FIXED_MSEC,
|
|
|
|
TS_PREC_FIXED_USEC,
|
|
|
|
TS_PREC_FIXED_NSEC
|
2005-08-25 21:29:54 +00:00
|
|
|
} 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;
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC ts_type timestamp_get_type(void);
|
|
|
|
WS_DLL_PUBLIC void timestamp_set_type(ts_type);
|
2004-01-19 03:46:43 +00:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC int timestamp_get_precision(void);
|
|
|
|
WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
|
2004-01-19 03:46:43 +00:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
|
|
|
|
WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type);
|
2010-05-06 10:32:59 +00:00
|
|
|
|
2011-12-29 00:08:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1999-06-19 01:47:43 +00:00
|
|
|
#endif /* timestamp.h */
|