(Trivial) Fix spellling in a comment.
[metze/wireshark/wip.git] / epan / timestamp.h
1 /* timestamp.h
2  * Defines for packet timestamps
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __TIMESTAMP_H__
26 #define __TIMESTAMP_H__
27
28 #include "ws_symbol_export.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 /*
35  * Type of time-stamp shown in the summary display.
36  */
37 typedef enum {
38         TS_RELATIVE,            /* Since start of capture */
39         TS_ABSOLUTE,            /* Local absolute time, without date */
40         TS_ABSOLUTE_WITH_YMD,   /* Local absolute time, with date in YYYY-MM-DD form */
41         TS_ABSOLUTE_WITH_YDOY,  /* Local absolute time, with date in YYYY DOY form */
42         TS_DELTA,               /* Since previous captured packet */
43         TS_DELTA_DIS,           /* Since previous displayed packet */
44         TS_EPOCH,               /* Seconds (and fractions) since epoch */
45         TS_UTC,                 /* UTC absolute time, without date */
46         TS_UTC_WITH_YMD,        /* UTC absolute time, with date in YYYY-MM-DD form */
47         TS_UTC_WITH_YDOY,       /* UTC absolute time, with date in YYYY DOY form */
48
49 /*
50  * Special value used for the command-line setting in Wireshark, to indicate
51  * that no value has been set from the command line.
52  */
53         TS_NOT_SET
54 } ts_type;
55
56 typedef enum {
57         TS_PREC_AUTO,           /* recent */
58         TS_PREC_FIXED_SEC,      /* recent and internal */
59         TS_PREC_FIXED_DSEC,     /* recent and internal */
60         TS_PREC_FIXED_CSEC,     /* recent and internal */
61         TS_PREC_FIXED_MSEC,     /* recent and internal */
62         TS_PREC_FIXED_USEC,     /* recent and internal */
63         TS_PREC_FIXED_NSEC,     /* recent and internal */
64         TS_PREC_AUTO_SEC,       /* internal */
65         TS_PREC_AUTO_DSEC,      /* internal */
66         TS_PREC_AUTO_CSEC,      /* internal */
67         TS_PREC_AUTO_MSEC,      /* internal */
68         TS_PREC_AUTO_USEC,      /* internal */
69         TS_PREC_AUTO_NSEC       /* internal */
70 } ts_precision;
71
72 typedef enum {
73         TS_SECONDS_DEFAULT,     /* recent */
74         TS_SECONDS_HOUR_MIN_SEC,/* recent */
75
76 /*
77  * Special value used for the command-line setting in Wireshark, to indicate
78  * that no value has been set from the command line.
79  */
80         TS_SECONDS_NOT_SET
81 } ts_seconds_type;
82
83 WS_DLL_PUBLIC ts_type timestamp_get_type(void);
84 WS_DLL_PUBLIC void timestamp_set_type(ts_type);
85
86 WS_DLL_PUBLIC int timestamp_get_precision(void);
87 WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
88
89 WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
90 WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type);
91
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95
96 #endif /* timestamp.h */