Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
time_shift.h
Go to the documentation of this file.
1
12#ifndef __TIME_SHIFT_H__
13#define __TIME_SHIFT_H__
14
15#include <epan/cfile.h>
16#include <wsutil/nstime.h>
17
18#ifdef __cplusplus
19extern "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
45const char * time_string_parse(const char *time_text, int *year, int *month, int *day, bool *negative, int *hour, int *minute, long double *second);
46
55const char * time_shift_all(capture_file *cf, const char *offset_text);
56
66const char * time_shift_settime(capture_file *cf, unsigned packet_num, const char *time_text);
67
79const char * time_shift_adjtime(capture_file *cf, unsigned packet1_num, const char *time1_text, unsigned packet2_num, const char *time2_text);
80
88const char * time_shift_undo(capture_file *cf);
89
90#ifdef __cplusplus
91}
92#endif /* __cplusplus */
93
94#endif /* __TIME_SHIFT_H__ */
Represents a capture file and its associated metadata.
Definition cfile.h:84
const char * time_string_parse(const char *time_text, int *year, int *month, int *day, bool *negative, int *hour, int *minute, long double *second)
Parse a time string and fill in each component.
Definition time_shift.c:119
const char * time_shift_settime(capture_file *cf, unsigned packet_num, const char *time_text)
Set the time for a single packet.
Definition time_shift.c:299
const char * time_shift_all(capture_file *cf, const char *offset_text)
Shift all packets by an offset.
Definition time_shift.c:257
const char * time_shift_adjtime(capture_file *cf, unsigned packet1_num, const char *time1_text, unsigned packet2_num, const char *time2_text)
Set the time for two packets and extrapolate the rest.
Definition time_shift.c:344
const char * time_shift_undo(capture_file *cf)
Reset the times for all packets.
Definition time_shift.c:428