Wireshark  4.3.0
The Wireshark network protocol analyzer
Functions
time_shift.h File Reference
#include "cfile.h"
#include <wsutil/nstime.h>

Go to the source code of this file.

Functions

const gchar * time_string_parse (const gchar *time_text, int *year, int *month, int *day, gboolean *negative, int *hour, int *minute, long double *second)
 
const gchar * time_shift_all (capture_file *cf, const gchar *offset_text)
 
const gchar * time_shift_settime (capture_file *cf, guint packet_num, const gchar *time_text)
 
const gchar * time_shift_adjtime (capture_file *cf, guint packet1_num, const gchar *time1_text, guint packet2_num, const gchar *time2_text)
 
const gchar * time_shift_undo (capture_file *cf)
 

Detailed Description

Submitted by Edwin Groothuis wires.nosp@m.hark.nosp@m.@mave.nosp@m.tju..nosp@m.org

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Function Documentation

◆ time_shift_all()

const gchar* time_shift_all ( capture_file cf,
const gchar *  offset_text 
)

Shift all packets by an offset

Parameters
cfCapture file to shift
offset_textString representation of the offset.
Returns
NULL on success or an error description on failure.

◆ time_string_parse()

const gchar* time_string_parse ( const gchar *  time_text,
int *  year,
int *  month,
int *  day,
gboolean *  negative,
int *  hour,
int *  minute,
long double *  second 
)

Parse a time string and fill in each component.

If year, month, and day are non-NULL a full time format "[YYYY-MM-DD] hh:mm:ss[.decimals]" is allowed. Otherwise an offset format "[-][[hh:]mm:]ss[.decimals]" is allowed.

Parameters
time_textTime string
yearYear. May be NULL
monthMonth. May be NULL
dayDay. May be NULL.
negativeTime offset is negative. May be NULL if year, month, and day are not NULL.
hourHours. Must not be NULL.
minuteMinutes. Must not be NULL.
secondSeconds. Must not be NULL.
Returns
NULL on success or an error description on failure.