2001-04-01 04:11:51 +00:00
|
|
|
/* frame_data.c
|
|
|
|
* Routines for packet disassembly
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
2008-01-08 22:54:51 +00:00
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2001-04-01 04:11:51 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2018-02-08 16:59:17 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2001-04-01 04:11:51 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 01:48:30 +00:00
|
|
|
#include "config.h"
|
2001-04-01 04:11:51 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
#include <glib.h>
|
|
|
|
|
2013-12-03 23:49:51 +00:00
|
|
|
#include <epan/epan.h>
|
2009-09-20 17:51:16 +00:00
|
|
|
#include <epan/frame_data.h>
|
2016-01-25 01:10:20 +00:00
|
|
|
#include <epan/column-utils.h>
|
2009-09-20 17:51:16 +00:00
|
|
|
#include <epan/timestamp.h>
|
2023-06-07 01:25:06 +00:00
|
|
|
#include <wiretap/wtap.h>
|
2021-06-18 18:21:42 +00:00
|
|
|
#include <wsutil/ws_assert.h>
|
2013-05-15 16:50:37 +00:00
|
|
|
|
2009-07-22 08:09:22 +00:00
|
|
|
#define COMPARE_FRAME_NUM() ((fdata1->num < fdata2->num) ? -1 : \
|
|
|
|
(fdata1->num > fdata2->num) ? 1 : \
|
|
|
|
0)
|
|
|
|
|
|
|
|
#define COMPARE_NUM(f) ((fdata1->f < fdata2->f) ? -1 : \
|
|
|
|
(fdata1->f > fdata2->f) ? 1 : \
|
|
|
|
COMPARE_FRAME_NUM())
|
|
|
|
|
|
|
|
/* Compare time stamps.
|
|
|
|
A packet whose time is a reference time is considered to have
|
|
|
|
a lower time stamp than any frame with a non-reference time;
|
|
|
|
if both packets' times are reference times, we compare the
|
|
|
|
times of the packets. */
|
2012-09-23 16:25:28 +00:00
|
|
|
#define COMPARE_TS_REAL(time1, time2) \
|
2018-12-27 02:26:24 +00:00
|
|
|
((fdata1->ref_time && !fdata2->ref_time) ? -1 : \
|
|
|
|
(!fdata1->ref_time && fdata2->ref_time) ? 1 : \
|
2012-09-23 16:25:28 +00:00
|
|
|
((time1).secs < (time2).secs) ? -1 : \
|
|
|
|
((time1).secs > (time2).secs) ? 1 : \
|
|
|
|
((time1).nsecs < (time2).nsecs) ? -1 :\
|
|
|
|
((time1).nsecs > (time2).nsecs) ? 1 : \
|
2009-07-22 08:09:22 +00:00
|
|
|
COMPARE_FRAME_NUM())
|
|
|
|
|
2012-09-23 16:25:28 +00:00
|
|
|
#define COMPARE_TS(ts) COMPARE_TS_REAL(fdata1->ts, fdata2->ts)
|
|
|
|
|
|
|
|
void
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_delta_abs_time(const struct epan_session *epan, const frame_data *fdata, guint32 prev_num, nstime_t *delta)
|
2012-09-23 16:25:28 +00:00
|
|
|
{
|
2013-07-21 20:48:30 +00:00
|
|
|
const nstime_t *prev_abs_ts = (prev_num) ? epan_get_frame_ts(epan, prev_num) : NULL;
|
|
|
|
|
|
|
|
if (prev_abs_ts) {
|
|
|
|
nstime_delta(delta, &fdata->abs_ts, prev_abs_ts);
|
2012-10-03 16:20:22 +00:00
|
|
|
} else {
|
|
|
|
/* If we don't have the time stamp of the previous packet,
|
|
|
|
it's because we have no displayed/captured packets prior to this.
|
|
|
|
Set the delta time to zero. */
|
|
|
|
nstime_set_zero(delta);
|
|
|
|
}
|
2012-09-23 16:25:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gint
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_data_time_delta_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2)
|
2012-09-23 16:25:28 +00:00
|
|
|
{
|
2012-10-03 16:20:22 +00:00
|
|
|
nstime_t del_cap_ts1, del_cap_ts2;
|
2012-09-23 16:25:28 +00:00
|
|
|
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_delta_abs_time(epan, fdata1, fdata1->num - 1, &del_cap_ts1);
|
|
|
|
frame_delta_abs_time(epan, fdata2, fdata2->num - 1, &del_cap_ts2);
|
2012-09-23 16:25:28 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
return COMPARE_TS_REAL(del_cap_ts1, del_cap_ts2);
|
2012-09-23 16:25:28 +00:00
|
|
|
}
|
|
|
|
|
2013-07-21 23:07:33 +00:00
|
|
|
static gint
|
|
|
|
frame_data_time_delta_rel_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2)
|
|
|
|
{
|
|
|
|
nstime_t del_rel_ts1, del_rel_ts2;
|
|
|
|
|
|
|
|
frame_delta_abs_time(epan, fdata1, fdata1->frame_ref_num, &del_rel_ts1);
|
|
|
|
frame_delta_abs_time(epan, fdata2, fdata2->frame_ref_num, &del_rel_ts2);
|
|
|
|
|
|
|
|
return COMPARE_TS_REAL(del_rel_ts1, del_rel_ts2);
|
|
|
|
}
|
|
|
|
|
2012-09-23 16:25:28 +00:00
|
|
|
static gint
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_data_time_delta_dis_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2)
|
2012-09-23 16:25:28 +00:00
|
|
|
{
|
2012-10-03 16:20:22 +00:00
|
|
|
nstime_t del_dis_ts1, del_dis_ts2;
|
2012-09-23 16:25:28 +00:00
|
|
|
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_delta_abs_time(epan, fdata1, fdata1->prev_dis_num, &del_dis_ts1);
|
|
|
|
frame_delta_abs_time(epan, fdata2, fdata2->prev_dis_num, &del_dis_ts2);
|
2012-09-23 16:25:28 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
return COMPARE_TS_REAL(del_dis_ts1, del_dis_ts2);
|
2012-09-23 16:25:28 +00:00
|
|
|
}
|
|
|
|
|
2009-07-22 08:09:22 +00:00
|
|
|
gint
|
2013-07-21 20:48:30 +00:00
|
|
|
frame_data_compare(const struct epan_session *epan, const frame_data *fdata1, const frame_data *fdata2, int field)
|
2009-07-22 08:09:22 +00:00
|
|
|
{
|
2012-10-03 16:20:22 +00:00
|
|
|
switch (field) {
|
|
|
|
case COL_NUMBER:
|
|
|
|
return COMPARE_FRAME_NUM();
|
|
|
|
|
|
|
|
case COL_CLS_TIME:
|
|
|
|
switch (timestamp_get_type()) {
|
|
|
|
case TS_ABSOLUTE:
|
2013-11-06 20:39:09 +00:00
|
|
|
case TS_ABSOLUTE_WITH_YMD:
|
|
|
|
case TS_ABSOLUTE_WITH_YDOY:
|
2012-10-03 16:20:22 +00:00
|
|
|
case TS_UTC:
|
2013-11-06 20:39:09 +00:00
|
|
|
case TS_UTC_WITH_YMD:
|
|
|
|
case TS_UTC_WITH_YDOY:
|
2012-10-03 16:20:22 +00:00
|
|
|
case TS_EPOCH:
|
|
|
|
return COMPARE_TS(abs_ts);
|
|
|
|
|
|
|
|
case TS_RELATIVE:
|
2013-07-21 23:07:33 +00:00
|
|
|
return frame_data_time_delta_rel_compare(epan, fdata1, fdata2);
|
2012-10-03 16:20:22 +00:00
|
|
|
|
|
|
|
case TS_DELTA:
|
2013-07-21 20:48:30 +00:00
|
|
|
return frame_data_time_delta_compare(epan, fdata1, fdata2);
|
2012-10-03 16:20:22 +00:00
|
|
|
|
|
|
|
case TS_DELTA_DIS:
|
2013-07-21 20:48:30 +00:00
|
|
|
return frame_data_time_delta_dis_compare(epan, fdata1, fdata2);
|
2012-10-03 16:20:22 +00:00
|
|
|
|
|
|
|
case TS_NOT_SET:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 0;
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_ABS_TIME:
|
2013-11-06 20:39:09 +00:00
|
|
|
case COL_ABS_YMD_TIME:
|
|
|
|
case COL_ABS_YDOY_TIME:
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_UTC_TIME:
|
2013-11-06 20:39:09 +00:00
|
|
|
case COL_UTC_YMD_TIME:
|
|
|
|
case COL_UTC_YDOY_TIME:
|
2012-10-03 16:20:22 +00:00
|
|
|
return COMPARE_TS(abs_ts);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_REL_TIME:
|
2013-07-21 23:07:33 +00:00
|
|
|
return frame_data_time_delta_rel_compare(epan, fdata1, fdata2);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_DELTA_TIME:
|
2013-07-21 20:48:30 +00:00
|
|
|
return frame_data_time_delta_compare(epan, fdata1, fdata2);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_DELTA_TIME_DIS:
|
2013-07-21 20:48:30 +00:00
|
|
|
return frame_data_time_delta_dis_compare(epan, fdata1, fdata2);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_PACKET_LENGTH:
|
|
|
|
return COMPARE_NUM(pkt_len);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
case COL_CUMULATIVE_BYTES:
|
|
|
|
return COMPARE_NUM(cum_bytes);
|
2009-07-22 08:09:22 +00:00
|
|
|
|
2012-10-03 16:20:22 +00:00
|
|
|
}
|
|
|
|
g_return_val_if_reached(0);
|
2009-07-22 08:09:22 +00:00
|
|
|
}
|
|
|
|
|
2009-09-20 19:01:23 +00:00
|
|
|
void
|
2018-02-09 00:19:12 +00:00
|
|
|
frame_data_init(frame_data *fdata, guint32 num, const wtap_rec *rec,
|
|
|
|
gint64 offset, guint32 cum_bytes)
|
2009-09-20 17:51:16 +00:00
|
|
|
{
|
|
|
|
fdata->pfd = NULL;
|
2009-09-21 11:26:23 +00:00
|
|
|
fdata->num = num;
|
2009-09-20 17:51:16 +00:00
|
|
|
fdata->file_off = offset;
|
2012-05-16 16:29:12 +00:00
|
|
|
fdata->subnum = 0;
|
2023-12-14 23:57:28 +00:00
|
|
|
fdata->passed_dfilter = 1;
|
2018-12-27 02:26:24 +00:00
|
|
|
fdata->dependent_of_displayed = 0;
|
2022-02-27 14:35:58 +00:00
|
|
|
fdata->dependent_frames = NULL;
|
2018-12-27 02:26:24 +00:00
|
|
|
fdata->encoding = PACKET_CHAR_ENC_CHAR_ASCII;
|
|
|
|
fdata->visited = 0;
|
|
|
|
fdata->marked = 0;
|
|
|
|
fdata->ref_time = 0;
|
|
|
|
fdata->ignored = 0;
|
|
|
|
fdata->has_ts = (rec->presence_flags & WTAP_HAS_TS) ? 1 : 0;
|
2022-11-01 10:01:35 +00:00
|
|
|
fdata->tcp_snd_manual_analysis = 0;
|
2018-02-09 00:19:12 +00:00
|
|
|
switch (rec->rec_type) {
|
|
|
|
|
|
|
|
case REC_TYPE_PACKET:
|
|
|
|
fdata->pkt_len = rec->rec_header.packet_header.len;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.packet_header.len;
|
|
|
|
fdata->cap_len = rec->rec_header.packet_header.caplen;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case REC_TYPE_FT_SPECIFIC_EVENT:
|
|
|
|
case REC_TYPE_FT_SPECIFIC_REPORT:
|
|
|
|
/*
|
|
|
|
* XXX
|
|
|
|
*/
|
2018-09-10 23:49:36 +00:00
|
|
|
fdata->pkt_len = rec->rec_header.ft_specific_header.record_len;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.ft_specific_header.record_len;
|
|
|
|
fdata->cap_len = rec->rec_header.ft_specific_header.record_len;
|
2018-02-09 00:19:12 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case REC_TYPE_SYSCALL:
|
2018-02-09 02:38:22 +00:00
|
|
|
/*
|
|
|
|
* XXX - is cum_bytes supposed to count non-packet bytes?
|
|
|
|
*/
|
|
|
|
fdata->pkt_len = rec->rec_header.syscall_header.event_len;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.syscall_header.event_len;
|
|
|
|
fdata->cap_len = rec->rec_header.syscall_header.event_filelen;
|
2018-02-09 00:19:12 +00:00
|
|
|
break;
|
2020-10-28 03:06:26 +00:00
|
|
|
|
2021-06-17 20:52:45 +00:00
|
|
|
case REC_TYPE_SYSTEMD_JOURNAL_EXPORT:
|
2020-10-28 03:06:26 +00:00
|
|
|
/*
|
|
|
|
* XXX - is cum_bytes supposed to count non-packet bytes?
|
|
|
|
*/
|
2021-06-17 20:52:45 +00:00
|
|
|
fdata->pkt_len = rec->rec_header.systemd_journal_export_header.record_len;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.systemd_journal_export_header.record_len;
|
|
|
|
fdata->cap_len = rec->rec_header.systemd_journal_export_header.record_len;
|
2020-10-28 03:06:26 +00:00
|
|
|
break;
|
2021-06-06 21:15:35 +00:00
|
|
|
|
|
|
|
case REC_TYPE_CUSTOM_BLOCK:
|
|
|
|
/*
|
|
|
|
* XXX - is cum_bytes supposed to count non-packet bytes?
|
|
|
|
*/
|
2021-08-04 17:57:52 +00:00
|
|
|
switch (rec->rec_header.custom_block_header.pen) {
|
|
|
|
case PEN_NFLX:
|
|
|
|
fdata->pkt_len = rec->rec_header.custom_block_header.length - 4;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.custom_block_header.length - 4;
|
|
|
|
fdata->cap_len = rec->rec_header.custom_block_header.length - 4;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
fdata->pkt_len = rec->rec_header.custom_block_header.length;
|
|
|
|
fdata->cum_bytes = cum_bytes + rec->rec_header.custom_block_header.length;
|
|
|
|
fdata->cap_len = rec->rec_header.custom_block_header.length;
|
|
|
|
break;
|
|
|
|
}
|
2021-06-06 21:15:35 +00:00
|
|
|
break;
|
|
|
|
|
2018-02-09 00:19:12 +00:00
|
|
|
}
|
|
|
|
|
2018-12-27 02:26:24 +00:00
|
|
|
/* To save some memory, we coerce it into 4 bits */
|
2021-06-18 18:21:42 +00:00
|
|
|
ws_assert(rec->tsprec <= 0xF);
|
2018-12-27 02:26:24 +00:00
|
|
|
fdata->tsprec = (unsigned int)rec->tsprec;
|
2018-02-09 00:19:12 +00:00
|
|
|
fdata->abs_ts = rec->ts;
|
2021-07-08 05:43:29 +00:00
|
|
|
fdata->has_modified_block = 0;
|
2018-12-27 02:26:24 +00:00
|
|
|
fdata->need_colorize = 0;
|
2009-09-20 17:51:16 +00:00
|
|
|
fdata->color_filter = NULL;
|
2012-05-16 16:29:12 +00:00
|
|
|
fdata->shift_offset.secs = 0;
|
|
|
|
fdata->shift_offset.nsecs = 0;
|
2013-07-21 23:07:33 +00:00
|
|
|
fdata->frame_ref_num = 0;
|
2013-07-21 20:48:30 +00:00
|
|
|
fdata->prev_dis_num = 0;
|
2009-09-22 14:23:20 +00:00
|
|
|
}
|
2009-09-20 17:51:16 +00:00
|
|
|
|
2009-09-22 14:23:20 +00:00
|
|
|
void
|
|
|
|
frame_data_set_before_dissect(frame_data *fdata,
|
|
|
|
nstime_t *elapsed_time,
|
2013-07-21 23:07:33 +00:00
|
|
|
const frame_data **frame_ref,
|
2013-07-21 20:48:30 +00:00
|
|
|
const frame_data *prev_dis)
|
2009-09-22 14:23:20 +00:00
|
|
|
{
|
2013-07-21 23:07:33 +00:00
|
|
|
nstime_t rel_ts;
|
|
|
|
|
Don't use frames without timestamp for delta time calculations
pcapng allows simple packet blocks (which don't have timestamps),
enhanced packet blocks (which do) and custom blocks (which might
or might not have timestamps, and even if they do have timestamps,
libwiretap might not know about them), and so some records may have
timestamps while others do not.
Do not use frames without timestamps in delta time calculations.
Don't use them as reference frames for time calculations, or for
the previously displayed frame for time calculations, where the
previously displayed frame that actually has a timestamp is used.
Have the various _get_frame_ts functions return null instead of
their ts value (that is currently handled; if records without
timestamps set their abs_ts to the special "unset" value of nstime_t
that could work too, except that isn't currently handled.)
Still allow the GUI to set frames without timestamps as "Time
References", because that does still affect the "Cumulative Bytes"
column, so it's not entirely pointless; unset the reference time
so that the timestamp from the next frame that does have a timestamp
will be used as reference time.
The "previous captured frame" will show a 0 time delta when
the previous frame doeesn't have a timestamp. Perhaps a user
would also want "previous captured frame with a timestamp,"
but we'd have to store that in frame data (adding memory to
that struct.)
Fix #19397
2023-10-14 13:52:49 +00:00
|
|
|
/* If this frame doesn't have a time stamp, don't set it as the
|
|
|
|
* reference frame used for calculating time deltas, set elapsed
|
|
|
|
* time, etc. We also won't need to calculate the delta of this
|
|
|
|
* frame's timestamp to any other frame.
|
|
|
|
*/
|
|
|
|
if (!fdata->has_ts) {
|
|
|
|
/* If it was marked as a reference time frame anyway (should we
|
|
|
|
* allow that?), clear the existing reference frame so that the
|
|
|
|
* next frame with a time stamp will become the reference frame.
|
|
|
|
*/
|
|
|
|
if(fdata->ref_time) {
|
|
|
|
*frame_ref = NULL;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-07-21 23:07:33 +00:00
|
|
|
/* Don't have the reference frame, set to current */
|
|
|
|
if (*frame_ref == NULL)
|
|
|
|
*frame_ref = fdata;
|
|
|
|
|
2013-08-01 21:20:31 +00:00
|
|
|
/* if this frames is marked as a reference time frame,
|
2013-07-21 23:07:33 +00:00
|
|
|
set reference frame this frame */
|
2018-12-27 02:26:24 +00:00
|
|
|
if(fdata->ref_time)
|
2013-07-21 23:07:33 +00:00
|
|
|
*frame_ref = fdata;
|
2009-09-21 20:17:59 +00:00
|
|
|
|
2009-09-20 17:51:16 +00:00
|
|
|
/* Get the time elapsed between the first packet and this packet. */
|
2013-07-21 23:07:33 +00:00
|
|
|
nstime_delta(&rel_ts, &fdata->abs_ts, &(*frame_ref)->abs_ts);
|
2009-09-20 17:51:16 +00:00
|
|
|
|
|
|
|
/* If it's greater than the current elapsed time, set the elapsed time
|
|
|
|
to it (we check for "greater than" so as not to be confused by
|
|
|
|
time moving backwards). */
|
2013-07-21 23:07:33 +00:00
|
|
|
if ((gint32)elapsed_time->secs < rel_ts.secs
|
|
|
|
|| ((gint32)elapsed_time->secs == rel_ts.secs && (gint32)elapsed_time->nsecs < rel_ts.nsecs)) {
|
|
|
|
*elapsed_time = rel_ts;
|
2009-09-20 17:51:16 +00:00
|
|
|
}
|
|
|
|
|
2013-07-21 23:07:33 +00:00
|
|
|
fdata->frame_ref_num = (*frame_ref != fdata) ? (*frame_ref)->num : 0;
|
2013-07-21 20:48:30 +00:00
|
|
|
fdata->prev_dis_num = (prev_dis) ? prev_dis->num : 0;
|
2009-09-20 17:51:16 +00:00
|
|
|
}
|
|
|
|
|
2009-09-22 14:23:20 +00:00
|
|
|
void
|
|
|
|
frame_data_set_after_dissect(frame_data *fdata,
|
2012-09-23 16:25:28 +00:00
|
|
|
guint32 *cum_bytes)
|
2009-09-22 14:23:20 +00:00
|
|
|
{
|
2009-09-22 14:50:43 +00:00
|
|
|
/* This frame either passed the display filter list or is marked as
|
|
|
|
a time reference frame. All time reference frames are displayed
|
2014-09-16 15:25:17 +00:00
|
|
|
even if they don't pass the display filter */
|
2018-12-27 02:26:24 +00:00
|
|
|
if(fdata->ref_time){
|
2009-09-22 14:50:43 +00:00
|
|
|
/* if this was a TIME REF frame we should reset the cul bytes field */
|
|
|
|
*cum_bytes = fdata->pkt_len;
|
|
|
|
fdata->cum_bytes = *cum_bytes;
|
|
|
|
} else {
|
|
|
|
/* increase cum_bytes with this packets length */
|
|
|
|
*cum_bytes += fdata->pkt_len;
|
|
|
|
fdata->cum_bytes = *cum_bytes;
|
2009-09-22 14:23:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-09-20 18:18:29 +00:00
|
|
|
void
|
2013-03-15 18:04:50 +00:00
|
|
|
frame_data_reset(frame_data *fdata)
|
|
|
|
{
|
2018-12-27 02:26:24 +00:00
|
|
|
fdata->visited = 0;
|
2015-10-28 05:59:35 +00:00
|
|
|
fdata->subnum = 0;
|
2013-03-15 18:04:50 +00:00
|
|
|
|
|
|
|
if (fdata->pfd) {
|
|
|
|
g_slist_free(fdata->pfd);
|
|
|
|
fdata->pfd = NULL;
|
|
|
|
}
|
2023-01-19 17:34:01 +00:00
|
|
|
|
|
|
|
if (fdata->dependent_frames) {
|
2023-01-28 12:41:50 +00:00
|
|
|
g_hash_table_destroy(fdata->dependent_frames);
|
2023-01-19 17:34:01 +00:00
|
|
|
fdata->dependent_frames = NULL;
|
|
|
|
}
|
2013-03-15 18:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
frame_data_destroy(frame_data *fdata)
|
2009-09-20 18:18:29 +00:00
|
|
|
{
|
2012-07-26 16:09:41 +00:00
|
|
|
if (fdata->pfd) {
|
2009-09-20 18:18:29 +00:00
|
|
|
g_slist_free(fdata->pfd);
|
2012-07-26 16:09:41 +00:00
|
|
|
fdata->pfd = NULL;
|
|
|
|
}
|
2022-02-27 14:35:58 +00:00
|
|
|
|
|
|
|
if (fdata->dependent_frames) {
|
2023-01-28 12:41:50 +00:00
|
|
|
g_hash_table_destroy(fdata->dependent_frames);
|
2022-02-27 14:35:58 +00:00
|
|
|
fdata->dependent_frames = NULL;
|
|
|
|
}
|
2009-09-20 18:18:29 +00:00
|
|
|
}
|
2013-03-15 18:04:50 +00:00
|
|
|
|
|
|
|
/*
|
2019-07-26 18:43:17 +00:00
|
|
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2013-03-15 18:04:50 +00:00
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 2
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=2 tabstop=8 expandtab:
|
|
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
|
|
|
*/
|