dcerpc-nt: add UNION_ALIGN_TO... helpers
[wireshark-sm.git] / epan / timestamp.h
blobdee61da227e33ed7af4fa4ab4cc83cc19cf2984b
1 /** @file
2 * Defines for packet timestamps
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #ifndef __TIMESTAMP_H__
12 #define __TIMESTAMP_H__
14 #include "ws_symbol_export.h"
16 #include <wsutil/nstime.h>
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
23 * Type of time-stamp shown in the summary display.
25 typedef enum {
26 TS_RELATIVE, /* Since start of capture */
27 TS_ABSOLUTE, /* Local absolute time, without date */
28 TS_ABSOLUTE_WITH_YMD, /* Local absolute time, with date in YYYY-MM-DD form */
29 TS_ABSOLUTE_WITH_YDOY, /* Local absolute time, with date in YYYY DOY form */
30 TS_DELTA, /* Since previous captured packet */
31 TS_DELTA_DIS, /* Since previous displayed packet */
32 TS_EPOCH, /* Seconds (and fractions) since epoch */
33 TS_UTC, /* UTC absolute time, without date */
34 TS_UTC_WITH_YMD, /* UTC absolute time, with date in YYYY-MM-DD form */
35 TS_UTC_WITH_YDOY, /* UTC absolute time, with date in YYYY DOY form */
38 * Special value used for the command-line setting in Wireshark, to indicate
39 * that no value has been set from the command line.
41 TS_NOT_SET
42 } ts_type;
44 typedef enum {
45 TS_PREC_AUTO = -1, /* Use what the capture file specifies */
46 TS_PREC_FIXED_SEC = WS_TSPREC_SEC,
47 TS_PREC_FIXED_100_MSEC = WS_TSPREC_100_MSEC,
48 TS_PREC_FIXED_10_MSEC = WS_TSPREC_10_MSEC,
49 TS_PREC_FIXED_MSEC = WS_TSPREC_MSEC,
50 TS_PREC_FIXED_100_USEC = WS_TSPREC_100_USEC,
51 TS_PREC_FIXED_10_USEC = WS_TSPREC_10_USEC,
52 TS_PREC_FIXED_USEC = WS_TSPREC_USEC,
53 TS_PREC_FIXED_100_NSEC = WS_TSPREC_100_NSEC,
54 TS_PREC_FIXED_10_NSEC = WS_TSPREC_10_NSEC,
55 TS_PREC_FIXED_NSEC = WS_TSPREC_NSEC,
58 * Special value used for the command-line setting in Wireshark, to indicate
59 * that no value has been set from the command line.
61 TS_PREC_NOT_SET = -2
62 } ts_precision;
64 typedef enum {
65 TS_SECONDS_DEFAULT, /* recent */
66 TS_SECONDS_HOUR_MIN_SEC,/* recent */
69 * Special value used for the command-line setting in Wireshark, to indicate
70 * that no value has been set from the command line.
72 TS_SECONDS_NOT_SET
73 } ts_seconds_type;
75 WS_DLL_PUBLIC ts_type timestamp_get_type(void);
76 WS_DLL_PUBLIC void timestamp_set_type(ts_type);
78 WS_DLL_PUBLIC int timestamp_get_precision(void);
79 WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
81 WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
82 WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type);
84 #ifdef __cplusplus
86 #endif /* __cplusplus */
88 #endif /* timestamp.h */