| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
timestamp.h
Go to the documentation of this file.
1
10#pragma once
11#include "ws_symbol_export.h"
12
13#include <wsutil/nstime.h>
14
15#ifdef __cplusplus
16 extern "C" {
17#endif /* __cplusplus */
18
22 typedef enum {
23 TS_RELATIVE,
24 TS_RELATIVE_CAP,
25 TS_ABSOLUTE,
26 TS_ABSOLUTE_WITH_YMD,
27 TS_ABSOLUTE_WITH_YDOY,
28 TS_DELTA,
29 TS_DELTA_DIS,
30 TS_EPOCH,
31 TS_UTC,
32 TS_UTC_WITH_YMD,
33 TS_UTC_WITH_YDOY,
34 TS_NOT_SET
35} ts_type;
36
37
41 typedef enum {
42 TS_PREC_AUTO = -1,
43 TS_PREC_FIXED_SEC = WS_TSPREC_SEC,
44 TS_PREC_FIXED_100_MSEC = WS_TSPREC_100_MSEC,
45 TS_PREC_FIXED_10_MSEC = WS_TSPREC_10_MSEC,
46 TS_PREC_FIXED_MSEC = WS_TSPREC_MSEC,
47 TS_PREC_FIXED_100_USEC = WS_TSPREC_100_USEC,
48 TS_PREC_FIXED_10_USEC = WS_TSPREC_10_USEC,
49 TS_PREC_FIXED_USEC = WS_TSPREC_USEC,
50 TS_PREC_FIXED_100_NSEC = WS_TSPREC_100_NSEC,
51 TS_PREC_FIXED_10_NSEC = WS_TSPREC_10_NSEC,
52 TS_PREC_FIXED_NSEC = WS_TSPREC_NSEC,
53 TS_PREC_NOT_SET = -2
54} ts_precision;
55
56
60 typedef enum {
61 TS_SECONDS_DEFAULT,
62 TS_SECONDS_HOUR_MIN_SEC,
63 TS_SECONDS_NOT_SET
64} ts_seconds_type;
65
71WS_DLL_PUBLIC ts_type timestamp_get_type(void);
72
78WS_DLL_PUBLIC void timestamp_set_type(ts_type ts_t);
79
85WS_DLL_PUBLIC int timestamp_get_precision(void);
86
92WS_DLL_PUBLIC void timestamp_set_precision(int tsp);
93
99WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void);
100
106WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type ts_t);
107
108#ifdef __cplusplus
109}
110#endif /* __cplusplus */
nstime.h
WS_TSPREC_USEC
@ WS_TSPREC_USEC
Definition nstime.h:399
WS_TSPREC_100_NSEC
@ WS_TSPREC_100_NSEC
Definition nstime.h:400
WS_TSPREC_100_MSEC
@ WS_TSPREC_100_MSEC
Definition nstime.h:394
WS_TSPREC_100_USEC
@ WS_TSPREC_100_USEC
Definition nstime.h:397
WS_TSPREC_NSEC
@ WS_TSPREC_NSEC
Definition nstime.h:402
WS_TSPREC_MSEC
@ WS_TSPREC_MSEC
Definition nstime.h:396
WS_TSPREC_10_MSEC
@ WS_TSPREC_10_MSEC
Definition nstime.h:395
WS_TSPREC_10_USEC
@ WS_TSPREC_10_USEC
Definition nstime.h:398
WS_TSPREC_SEC
@ WS_TSPREC_SEC
Definition nstime.h:393
WS_TSPREC_10_NSEC
@ WS_TSPREC_10_NSEC
Definition nstime.h:401
timestamp_set_type
WS_DLL_PUBLIC void timestamp_set_type(ts_type ts_t)
Set the timestamp type.
Definition timestamp.c:28
ts_seconds_type
ts_seconds_type
Controls how the seconds component of a timestamp is formatted for display.
Definition timestamp.h:60
TS_SECONDS_DEFAULT
@ TS_SECONDS_DEFAULT
Definition timestamp.h:61
TS_SECONDS_NOT_SET
@ TS_SECONDS_NOT_SET
Definition timestamp.h:63
TS_SECONDS_HOUR_MIN_SEC
@ TS_SECONDS_HOUR_MIN_SEC
Definition timestamp.h:62
timestamp_set_precision
WS_DLL_PUBLIC void timestamp_set_precision(int tsp)
Set the timestamp precision.
Definition timestamp.c:39
timestamp_get_type
WS_DLL_PUBLIC ts_type timestamp_get_type(void)
Get the current timestamp type.
Definition timestamp.c:23
timestamp_set_seconds_type
WS_DLL_PUBLIC void timestamp_set_seconds_type(ts_seconds_type ts_t)
Set the timestamp seconds type.
Definition timestamp.c:50
ts_precision
ts_precision
Sub-second precision used when formatting packet timestamps.
Definition timestamp.h:41
TS_PREC_FIXED_100_USEC
@ TS_PREC_FIXED_100_USEC
Definition timestamp.h:47
TS_PREC_FIXED_MSEC
@ TS_PREC_FIXED_MSEC
Definition timestamp.h:46
TS_PREC_NOT_SET
@ TS_PREC_NOT_SET
Definition timestamp.h:53
TS_PREC_AUTO
@ TS_PREC_AUTO
Definition timestamp.h:42
TS_PREC_FIXED_10_USEC
@ TS_PREC_FIXED_10_USEC
Definition timestamp.h:48
TS_PREC_FIXED_10_NSEC
@ TS_PREC_FIXED_10_NSEC
Definition timestamp.h:51
TS_PREC_FIXED_NSEC
@ TS_PREC_FIXED_NSEC
Definition timestamp.h:52
TS_PREC_FIXED_USEC
@ TS_PREC_FIXED_USEC
Definition timestamp.h:49
TS_PREC_FIXED_SEC
@ TS_PREC_FIXED_SEC
Definition timestamp.h:43
TS_PREC_FIXED_10_MSEC
@ TS_PREC_FIXED_10_MSEC
Definition timestamp.h:45
TS_PREC_FIXED_100_NSEC
@ TS_PREC_FIXED_100_NSEC
Definition timestamp.h:50
TS_PREC_FIXED_100_MSEC
@ TS_PREC_FIXED_100_MSEC
Definition timestamp.h:44
ts_type
ts_type
Format used to display packet timestamps in the summary packet list.
Definition timestamp.h:22
TS_ABSOLUTE
@ TS_ABSOLUTE
Definition timestamp.h:25
TS_ABSOLUTE_WITH_YMD
@ TS_ABSOLUTE_WITH_YMD
Definition timestamp.h:26
TS_UTC
@ TS_UTC
Definition timestamp.h:31
TS_ABSOLUTE_WITH_YDOY
@ TS_ABSOLUTE_WITH_YDOY
Definition timestamp.h:27
TS_RELATIVE_CAP
@ TS_RELATIVE_CAP
Definition timestamp.h:24
TS_UTC_WITH_YMD
@ TS_UTC_WITH_YMD
Definition timestamp.h:32
TS_RELATIVE
@ TS_RELATIVE
Definition timestamp.h:23
TS_DELTA_DIS
@ TS_DELTA_DIS
Definition timestamp.h:29
TS_DELTA
@ TS_DELTA
Definition timestamp.h:28
TS_EPOCH
@ TS_EPOCH
Definition timestamp.h:30
TS_NOT_SET
@ TS_NOT_SET
Definition timestamp.h:34
TS_UTC_WITH_YDOY
@ TS_UTC_WITH_YDOY
Definition timestamp.h:33
timestamp_get_precision
WS_DLL_PUBLIC int timestamp_get_precision(void)
Get the current timestamp precision.
Definition timestamp.c:34
timestamp_get_seconds_type
WS_DLL_PUBLIC ts_seconds_type timestamp_get_seconds_type(void)
Get the current timestamp seconds type.
Definition timestamp.c:45