Wireshark  4.3.0
The Wireshark network protocol analyzer
time_shift.h
Go to the documentation of this file.
1 
12 #ifndef __TIME_SHIFT_H__
13 #define __TIME_SHIFT_H__
14 
15 #include "cfile.h"
16 #include <wsutil/nstime.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
21 
22 /*
23  * XXX - We might want to move all of this somewhere more accessible to
24  * editcap so that we can make its time adjustments more versatile.
25  */
26 
45 const char * time_string_parse(const char *time_text, int *year, int *month, int *day, bool *negative, int *hour, int *minute, long double *second);
46 
54 const char * time_shift_all(capture_file *cf, const char *offset_text);
55 
56 /* Set the time for a single packet
57  *
58  * @param cf Capture file to set
59  * @param packet_num Packet to set
60  * @param time_text String representation of the time
61  *
62  * @return NULL on success or an error description on failure.
63  */
64 const char * time_shift_settime(capture_file *cf, unsigned packet_num, const char *time_text);
65 
66 /* Set the time for two packets and extrapolate the rest
67  *
68  * @param cf Capture file to set
69  * @param packet1_num First packet to set
70  * @param time1_text String representation of the first packet time
71  * @param packet2_num Second packet to set
72  * @param time2_text String representation of the second packet time
73  *
74  * @return NULL on success or an error description on failure.
75  */
76 const char * time_shift_adjtime(capture_file *cf, unsigned packet1_num, const char *time1_text, unsigned packet2_num, const char *time2_text);
77 
78 /* Reset the times for all packets
79  *
80  * @param cf Capture file to set
81  *
82  * @return NULL on success or an error description on failure.
83  */
84 const char * time_shift_undo(capture_file *cf);
85 
86 #ifdef __cplusplus
87 }
88 #endif /* __cplusplus */
89 
90 #endif /* __TIME_SHIFT_H__ */
Definition: cfile.h:67
const char * time_shift_all(capture_file *cf, const char *offset_text)
const char * time_string_parse(const char *time_text, int *year, int *month, int *day, bool *negative, int *hour, int *minute, long double *second)
Definition: time_shift.c:119