1 /* timestamp.h
2  * Defines for packet timestamps
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef __TIMESTAMP_H__
12 #define __TIMESTAMP_H__
13 
14 #include "ws_symbol_export.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19 
20 /*
21  * Type of time-stamp shown in the summary display.
22  */
23 typedef enum {
24 	TS_RELATIVE,            /* Since start of capture */
25 	TS_ABSOLUTE,		/* Local absolute time, without date */
26 	TS_ABSOLUTE_WITH_YMD,	/* Local absolute time, with date in YYYY-MM-DD form */
27 	TS_ABSOLUTE_WITH_YDOY,	/* Local absolute time, with date in YYYY DOY form */
fw_cfg_arch_key_name(uint16_t key)28 	TS_DELTA,               /* Since previous captured packet */
29 	TS_DELTA_DIS,           /* Since previous displayed packet */
30 	TS_EPOCH,               /* Seconds (and fractions) since epoch */
31 	TS_UTC,			/* UTC absolute time, without date */
32 	TS_UTC_WITH_YMD,	/* UTC absolute time, with date in YYYY-MM-DD form */
33 	TS_UTC_WITH_YDOY,	/* UTC absolute time, with date in YYYY DOY form */
34 
35 /*
36  * Special value used for the command-line setting in Wireshark, to indicate
37  * that no value has been set from the command line.
38  */
39 	TS_NOT_SET
40 } ts_type;
41 
42 typedef enum {
43 	TS_PREC_AUTO,
44 	TS_PREC_FIXED_SEC,
45 	TS_PREC_FIXED_DSEC,
46 	TS_PREC_FIXED_CSEC,
47 	TS_PREC_FIXED_MSEC,
48 	TS_PREC_FIXED_USEC,
fw_cfg_build_smbios(MachineState * ms,FWCfgState * fw_cfg)49 	TS_PREC_FIXED_NSEC
50 } ts_precision;
51 
52 typedef enum {
53 	TS_SECONDS_DEFAULT,	/* recent */
54 	TS_SECONDS_HOUR_MIN_SEC,/* recent */
55 
56 /*
57  * Special value used for the command-line setting in Wireshark, to indicate
58  * that no value has been set from the command line.
59  */
60 	TS_SECONDS_NOT_SET
61 } ts_seconds_type;
62 
63 WS_DLL_PUBLIC ts_type timestamp_get_type(void);
64 WS_DLL_PUBLIC void timestamp_set_type(ts_type);
65 
66 WS_DLL_PUBLIC int timestamp_get_precision(void);
67 WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
68 
69 WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
70 WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type);
71 
72 #ifdef __cplusplus
73 }
74 #endif /* __cplusplus */
75 
76 #endif /* timestamp.h */
77