| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
timestamp.h
Go to the documentation of this file.
1
11#ifndef __TIMESTAMP_H__
12#define __TIMESTAMP_H__
13
14#include "ws_symbol_export.h"
15
16#include <wsutil/nstime.h>
17
18#ifdef __cplusplus
19 extern "C" {
20#endif /* __cplusplus */
21
22/*
23 * Type of time-stamp shown in the summary display.
24 */
25 typedef enum {
26 TS_RELATIVE, /* Since first captured frame */
27 TS_RELATIVE_CAP, /* Since start of capture */
28 TS_ABSOLUTE, /* Local absolute time, without date */
29 TS_ABSOLUTE_WITH_YMD, /* Local absolute time, with date in YYYY-MM-DD form */
30 TS_ABSOLUTE_WITH_YDOY, /* Local absolute time, with date in YYYY DOY form */
31 TS_DELTA, /* Since previous captured packet */
32 TS_DELTA_DIS, /* Since previous displayed packet */
33 TS_EPOCH, /* Seconds (and fractions) since epoch */
34 TS_UTC, /* UTC absolute time, without date */
35 TS_UTC_WITH_YMD, /* UTC absolute time, with date in YYYY-MM-DD form */
36 TS_UTC_WITH_YDOY, /* UTC absolute time, with date in YYYY DOY form */
37
38/*
39 * Special value used for the command-line setting in Wireshark, to indicate
40 * that no value has been set from the command line.
41 */
42 TS_NOT_SET
43} ts_type;
44
45 typedef enum {
46 TS_PREC_AUTO = -1, /* Use what the capture file specifies */
47 TS_PREC_FIXED_SEC = WS_TSPREC_SEC,
48 TS_PREC_FIXED_100_MSEC = WS_TSPREC_100_MSEC,
49 TS_PREC_FIXED_10_MSEC = WS_TSPREC_10_MSEC,
50 TS_PREC_FIXED_MSEC = WS_TSPREC_MSEC,
51 TS_PREC_FIXED_100_USEC = WS_TSPREC_100_USEC,
52 TS_PREC_FIXED_10_USEC = WS_TSPREC_10_USEC,
53 TS_PREC_FIXED_USEC = WS_TSPREC_USEC,
54 TS_PREC_FIXED_100_NSEC = WS_TSPREC_100_NSEC,
55 TS_PREC_FIXED_10_NSEC = WS_TSPREC_10_NSEC,
56 TS_PREC_FIXED_NSEC = WS_TSPREC_NSEC,
57
58/*
59 * Special value used for the command-line setting in Wireshark, to indicate
60 * that no value has been set from the command line.
61 */
62 TS_PREC_NOT_SET = -2
63} ts_precision;
64
65 typedef enum {
66 TS_SECONDS_DEFAULT, /* recent */
67 TS_SECONDS_HOUR_MIN_SEC,/* recent */
68
69/*
70 * Special value used for the command-line setting in Wireshark, to indicate
71 * that no value has been set from the command line.
72 */
73 TS_SECONDS_NOT_SET
74} ts_seconds_type;
75
76WS_DLL_PUBLIC ts_type timestamp_get_type(void);
77WS_DLL_PUBLIC void timestamp_set_type(ts_type);
78
79WS_DLL_PUBLIC int timestamp_get_precision(void);
80WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
81
82WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
83WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type);
84
85#ifdef __cplusplus
86}
87#endif /* __cplusplus */
88
89#endif /* timestamp.h */
nstime.h
WS_TSPREC_USEC
@ WS_TSPREC_USEC
Definition nstime.h:361
WS_TSPREC_100_NSEC
@ WS_TSPREC_100_NSEC
Definition nstime.h:362
WS_TSPREC_100_MSEC
@ WS_TSPREC_100_MSEC
Definition nstime.h:356
WS_TSPREC_100_USEC
@ WS_TSPREC_100_USEC
Definition nstime.h:359
WS_TSPREC_NSEC
@ WS_TSPREC_NSEC
Definition nstime.h:364
WS_TSPREC_MSEC
@ WS_TSPREC_MSEC
Definition nstime.h:358
WS_TSPREC_10_MSEC
@ WS_TSPREC_10_MSEC
Definition nstime.h:357
WS_TSPREC_10_USEC
@ WS_TSPREC_10_USEC
Definition nstime.h:360
WS_TSPREC_SEC
@ WS_TSPREC_SEC
Definition nstime.h:355
WS_TSPREC_10_NSEC
@ WS_TSPREC_10_NSEC
Definition nstime.h:363