clopts_common.c
disabled_protos.c
frame_data_sequence.c
+ frame_tvbuff.c
packet-range.c
print.c
ps.c
clopts_common.c \
disabled_protos.c \
frame_data_sequence.c \
+ frame_tvbuff.c \
packet-range.c \
print.c \
ps.c \
file.h \
fileset.h \
frame_data_sequence.h \
+ frame_tvbuff.h \
isprint.h \
packet-range.h \
print.h \
void
epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
- const guint8* data, frame_data *fd, column_info *cinfo)
+ tvbuff_t *tvb, frame_data *fd, column_info *cinfo)
{
#ifdef HAVE_LUA
wslua_prime_dfilter(edt); /* done before entering wmem scope */
#endif
wmem_enter_packet_scope();
- dissect_packet(edt, phdr, data, fd, cinfo);
+ dissect_packet(edt, phdr, tvb, fd, cinfo);
/* free all memory allocated */
ep_free_all();
void
epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
- const guint8* data, frame_data *fd, column_info *cinfo)
+ tvbuff_t *tvb, frame_data *fd, column_info *cinfo)
{
wmem_enter_packet_scope();
tap_queue_init(edt);
- dissect_packet(edt, phdr, data, fd, cinfo);
+ dissect_packet(edt, phdr, tvb, fd, cinfo);
tap_push_tapped_queue(edt);
/* free all memory allocated */
WS_DLL_PUBLIC
void
epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
- const guint8* data, frame_data *fd, column_info *cinfo);
+ tvbuff_t *tvb, frame_data *fd, column_info *cinfo);
WS_DLL_PUBLIC
void
epan_dissect_run_with_taps(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
- const guint8* data, frame_data *fd, column_info *cinfo);
+ tvbuff_t *tvb, frame_data *fd, column_info *cinfo);
/** Prime a proto_tree using the fields/protocols used in a dfilter. */
WS_DLL_PUBLIC
/* Creates the top-most tvbuff and calls dissect_frame() */
void
dissect_packet(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
- const guchar *pd, frame_data *fd, column_info *cinfo)
+ tvbuff_t *tvb, frame_data *fd, column_info *cinfo)
{
/* We have to preserve the pool pointer across the memzeroing */
wmem_allocator_t *tmp = edt->pi.pool;
edt->pi.annex_a_used = MTP2_ANNEX_A_USED_UNKNOWN;
edt->pi.dcerpc_procedure_name="";
edt->pi.link_dir = LINK_DIR_UNKNOWN;
- edt->tvb = NULL;
+ edt->tvb = tvb;
/* to enable decode as for ethertype=0x0000 (fix for bug 4721) */
edt->pi.ethertype = G_MAXINT;
EP_CHECK_CANARY(("before dissecting frame %d",fd->num));
TRY {
- /*
- * XXX - currently, the length arguments to
- * tvb_new_real_data() are signed, but the captured
- * and reported length values are unsigned; this means
- * that length values > 2^31 - 1 will appear as
- * negative lengths in tvb_new_real_data().
- *
- * Captured length values that large will already
- * have been filtered out by the Wiretap modules
- * (the file will be reported as corrupted), to
- * avoid trying to allocate large chunks of data.
- *
- * Reported length values will not have been
- * filtered out, and should not be filtered out,
- * as those lengths are not necessarily invalid.
- *
- * For now, we clip the reported length at G_MAXINT,
- * so that tvb_new_real_data() doesn't fail. It
- * would throw an exception, which we'd catch, but
- * that would mean we would have no tvbuffs
- * associated with edt, which would upset much of
- * the rest of the application.
- */
- edt->tvb = tvb_new_real_data(pd, fd->cap_len,
- fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len);
/* Add this tvbuffer into the data_src list */
add_new_data_source(&edt->pi, edt->tvb, "Frame");
* Dissectors should never modify the packet data.
*/
extern void dissect_packet(epan_dissect_t *edt,
- struct wtap_pkthdr *phdr, const guchar *pd,
+ struct wtap_pkthdr *phdr, tvbuff_t *tvb,
frame_data *fd, column_info *cinfo);
/* These functions are in packet-ethertype.c */
static guint64
_tvb_get_bits64(tvbuff_t *tvb, guint bit_offset, const gint total_no_of_bits);
-static tvbuff_t *
+tvbuff_t *
tvb_new(const struct tvb_ops *ops)
{
tvbuff_t *tvb;
typedef void (*tvbuff_free_cb_t)(void*);
+WS_DLL_PUBLIC tvbuff_t *tvb_new(const struct tvb_ops *ops)
+
/** Extracts 'number of bits' starting at 'bit offset'.
* Returns a pointer to a newly initialized ep_alloc'd REAL_DATA
* tvbuff with the bits octet aligned.
#include "print.h"
#include "file.h"
#include "fileset.h"
+#include "frame_tvbuff.h"
#include "wsutil/tempfile.h"
#include "merge.h"
epan_dissect_prime_dfilter(&edt, dfcode);
}
- epan_dissect_run_with_taps(&edt, phdr, buf, fdata, cinfo);
+ epan_dissect_run_with_taps(&edt, phdr, frame_tvbuff_new(fdata, buf), fdata, cinfo);
/* If we don't have a display filter, set "passed_dfilter" to 1. */
if (dfcode != NULL) {
epan_dissect_t edt;
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, cf->rfcode);
- epan_dissect_run(&edt, phdr, buf, &fdlocal, NULL);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(&fdlocal, buf), &fdlocal, NULL);
passed = dfilter_apply_edt(cf->rfcode, &edt);
epan_dissect_cleanup(&edt);
}
epan_dissect_t edt;
epan_dissect_init(&edt, args->construct_protocol_tree, FALSE);
- epan_dissect_run_with_taps(&edt, phdr, pd, fdata, args->cinfo);
+ epan_dissect_run_with_taps(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, args->cinfo);
epan_dissect_cleanup(&edt);
return TRUE;
information. */
if (args->print_args->print_summary) {
col_custom_prime_edt(&edt, &cf->cinfo);
- epan_dissect_run(&edt, phdr, pd, fdata, &cf->cinfo);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
} else
- epan_dissect_run(&edt, phdr, pd, fdata, NULL);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
if (args->print_formfeed) {
if (!new_page(args->print_args->stream))
/* Create the protocol tree, but don't fill in the column information. */
epan_dissect_init(&edt, TRUE, TRUE);
- epan_dissect_run(&edt, phdr, pd, fdata, NULL);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
/* Write out the information in that tree. */
proto_tree_write_pdml(&edt, fh);
proto_tree_needed = have_custom_cols(&cf->cinfo);
epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
col_custom_prime_edt(&edt, &cf->cinfo);
- epan_dissect_run(&edt, phdr, pd, fdata, &cf->cinfo);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
/* Write out the information in that tree. */
proto_tree_needed = have_custom_cols(&cf->cinfo);
epan_dissect_init(&edt, proto_tree_needed, proto_tree_needed);
col_custom_prime_edt(&edt, &cf->cinfo);
- epan_dissect_run(&edt, phdr, pd, fdata, &cf->cinfo);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&edt, FALSE, TRUE);
/* Write out the information in that tree. */
epan_dissect_t edt;
epan_dissect_init(&edt, TRUE, TRUE);
- epan_dissect_run(&edt, phdr, pd, fdata, NULL);
+ epan_dissect_run(&edt, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
proto_tree_write_carrays(fdata->num, fh, &edt);
epan_dissect_cleanup(&edt);
/* Construct the protocol tree, including the displayed text */
epan_dissect_init(&edt, TRUE, TRUE);
/* We don't need the column information */
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
/* Iterate through all the nodes, seeing if they have text that matches. */
mdata->cf = cf;
/* Don't bother constructing the protocol tree */
epan_dissect_init(&edt, FALSE, FALSE);
/* Get the column information */
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata,
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata,
&cf->cinfo);
/* Find the Info column */
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
result = dfilter_apply_edt(sfcode, &edt) ? MR_MATCHED : MR_NOTMATCHED;
epan_dissect_cleanup(&edt);
return result;
cf->edt = epan_dissect_new(TRUE, TRUE);
tap_build_interesting(cf->edt);
- epan_dissect_run(cf->edt, &cf->phdr, buffer_start_ptr(&cf->buf),
+ epan_dissect_run(cf->edt, &cf->phdr, frame_tvbuff_new_buffer(cf->current_frame, &cf->buf),
cf->current_frame, NULL);
dfilter_macro_build_ftv_cache(cf->edt->tree);
--- /dev/null
+/* frame_tvbuff.c
+ * Implements a tvbuff for frame
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+
+#include <epan/packet.h>
+#include <epan/tvbuff-int.h>
+#include <epan/tvbuff.h>
+
+#include "frame_tvbuff.h"
+
+/* XXX, to read data with wtap_seek_read() we need:
+ * cf->wth, fdata->file_off, fdata->cap_len
+ * add when ready to structure below
+ */
+
+struct tvb_frame {
+ struct tvbuff tvb;
+};
+
+static gsize
+frame_sizeof(void)
+{
+ return sizeof(struct tvb_frame);
+}
+
+static guint
+frame_offset(const tvbuff_t *tvb _U_, const guint counter)
+{
+ return counter;
+}
+
+static const struct tvb_ops tvb_frame_ops = {
+ frame_sizeof, /* size */
+ NULL, /* free */
+ frame_offset, /* offset */
+ NULL, /* get_ptr */
+ NULL, /* memcpy */
+ NULL, /* find_guint8 */
+ NULL, /* pbrk_guint8 */
+};
+
+/* based on tvb_new_real_data() */
+tvbuff_t *
+frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
+{
+ tvbuff_t *tvb;
+
+ tvb = tvb_new(&tvb_frame_ops);
+
+ /*
+ * XXX - currently, the length arguments in
+ * tvbuff structure are signed, but the captured
+ * and reported length values are unsigned; this means
+ * that length values > 2^31 - 1 will appear as
+ * negative lengths
+ *
+ * Captured length values that large will already
+ * have been filtered out by the Wiretap modules
+ * (the file will be reported as corrupted), to
+ * avoid trying to allocate large chunks of data.
+ *
+ * Reported length values will not have been
+ * filtered out, and should not be filtered out,
+ * as those lengths are not necessarily invalid.
+ *
+ * For now, we clip the reported length at G_MAXINT
+ *
+ * (XXX, is this still a problem?) There was an exception when we call
+ * tvb_new_real_data() now there's no one
+ */
+
+ tvb->real_data = buf;
+ tvb->length = fd->cap_len;
+ tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
+ tvb->initialized = TRUE;
+
+ /*
+ * This is the top-level real tvbuff for this data source,
+ * so its data source tvbuff is itself.
+ */
+ tvb->ds_tvb = tvb;
+
+ return tvb;
+}
+
+tvbuff_t *
+frame_tvbuff_new_buffer(const frame_data *fd, Buffer *buf)
+{
+ return frame_tvbuff_new(fd, buffer_start_ptr(buf));
+}
--- /dev/null
+/* frame_tvbuff.h
+ * Implements a tvbuff for frame
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __FRAME_TVBUFF__
+#define __FRAME_TVBUFF_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+extern tvbuff_t *frame_tvbuff_new(const frame_data *fd, const guint8 *buf);
+
+extern tvbuff_t *frame_tvbuff_new_buffer(const frame_data *fd, Buffer *buf);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __FRAME_TVBUFF_H__ */
#include "globals.h"
#include "proto_hier_stats.h"
+#include "frame_tvbuff.h"
#include "ui/progress_dlg.h"
#include <epan/epan_dissect.h>
#include <wtap.h>
epan_dissect_init(&edt, TRUE, FALSE);
/* Don't fake protocols. We need them for the protocol hierarchy */
epan_dissect_fake_protocols(&edt, FALSE);
- epan_dissect_run(&edt, &phdr, buffer_start_ptr(&buf), frame, cinfo);
+ epan_dissect_run(&edt, &phdr, frame_tvbuff_new_buffer(frame, &buf), frame, cinfo);
/* Get stats from this protocol tree */
process_tree(edt.tree, ps, frame->pkt_len);
#include "globals.h"
#include <epan/packet.h>
#include "file.h"
+#include "frame_tvbuff.h"
#include "disabled_protos.h"
#include <epan/prefs.h>
#include <epan/column.h>
/* We only need the columns if we're printing packet info but we're
*not* verbose; in verbose mode, we print the protocol tree, not
the protocol summary. */
- epan_dissect_run_with_taps(&edt, whdr, pd, &fdata, &cf->cinfo);
+ epan_dissect_run_with_taps(&edt, whdr, frame_tvbuff_new(&fdata, pd), &fdata, &cf->cinfo);
frame_data_set_after_dissect(&fdata, &cum_bytes);
prev_dis_frame = fdata;
#include <epan/timestamp.h>
#include <epan/packet.h>
#include "file.h"
+#include "frame_tvbuff.h"
#include "disabled_protos.h"
#include <epan/prefs.h>
#include <epan/column.h>
frame_data_set_before_dissect(&fdlocal, &cf->elapsed_time,
&first_ts, prev_dis, prev_cap);
- epan_dissect_run(&edt, whdr, pd, &fdlocal, NULL);
+ epan_dissect_run(&edt, whdr, frame_tvbuff_new(&fdlocal, pd), &fdlocal, NULL);
/* Run the read filter if we have one. */
if (cf->rfcode)
frame_data_set_before_dissect(fdata, &cf->elapsed_time,
&first_ts, prev_dis, prev_cap);
- epan_dissect_run_with_taps(&edt, phdr, buffer_start_ptr(buf), fdata, cinfo);
+ epan_dissect_run_with_taps(&edt, phdr, frame_tvbuff_new_buffer(fdata, buf), fdata, cinfo);
/* Run the read/display filter if we have one. */
if (cf->dfcode)
frame_data_set_before_dissect(&fdata, &cf->elapsed_time,
&first_ts, prev_dis, prev_cap);
- epan_dissect_run_with_taps(&edt, whdr, pd, &fdata, cinfo);
+ epan_dissect_run_with_taps(&edt, whdr, frame_tvbuff_new(&fdata, pd), &fdata, cinfo);
/* Run the filters if we have them. */
if (cf->rfcode)
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/gui_utils.h"
+#include "frame_tvbuff.h"
+
enum
{
PACKET_COLUMN,
return; /* error reading the frame */
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf),
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf),
fdata, NULL);
/* if it is not an iax2 frame, show an error dialog */
/* general (not GTK specific) */
#include "../file.h"
+#include "../frame_tvbuff.h"
#include "../summary.h"
#include "../filters.h"
#include "../disabled_protos.h"
epan_dissect_init(&edt, FALSE, FALSE);
col_custom_prime_edt(&edt, &cfile.cinfo);
- epan_dissect_run(&edt, &cfile.phdr, buffer_start_ptr(&cfile.buf),
+ epan_dissect_run(&edt, &cfile.phdr, frame_tvbuff_new_buffer(fdata, &cfile.buf),
fdata, &cfile.cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
epan_dissect_init(&edt, have_custom_cols(&cfile.cinfo), FALSE);
col_custom_prime_edt(&edt, &cfile.cinfo);
- epan_dissect_run(&edt, &cfile.phdr, buffer_start_ptr(&cfile.buf),
+ epan_dissect_run(&edt, &cfile.phdr, frame_tvbuff_new_buffer(fdata, &cfile.buf),
fdata, &cfile.cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
#include "color.h"
#include "color_filters.h"
+#include "frame_tvbuff.h"
#include "globals.h"
* XXX - need to catch an OutOfMemoryError exception and
* attempt to recover from it.
*/
- epan_dissect_run(&edt, &phdr, buffer_start_ptr(&buf), fdata, cinfo);
+ epan_dissect_run(&edt, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, cinfo);
if (dissect_color)
fdata->color_filter = color_filters_colorize_packet(&edt);
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/gui_utils.h"
+#include "frame_tvbuff.h"
+
#define BV_SIZE 75
#define TV_SIZE 95
proto_tree_draw(NULL, DataPtr->tree_view);
epan_dissect_cleanup(&(DataPtr->edt));
epan_dissect_init(&(DataPtr->edt), TRUE, TRUE);
- epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, DataPtr->pd, DataPtr->frame, NULL);
+ epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd), DataPtr->frame, NULL);
add_byte_views(&(DataPtr->edt), DataPtr->tree_view, DataPtr->bv_nb_ptr);
proto_tree_draw(DataPtr->edt.tree, DataPtr->tree_view);
if (old_finfo->hfinfo)
proto_tree_prime_hfid(edt.tree, old_finfo->hfinfo->id);
*/
- epan_dissect_run(&edt, &DataPtr->phdr, DataPtr->pd, DataPtr->frame, NULL);
+ epan_dissect_run(&edt, &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd), DataPtr->frame, NULL);
/* Try to find finfo which looks like old_finfo.
* We might not found one, if protocol requires specific magic values, etc... */
proto_tree_draw(NULL, DataPtr->tree_view);
epan_dissect_cleanup(&(DataPtr->edt));
epan_dissect_init(&(DataPtr->edt), TRUE, TRUE);
- epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, DataPtr->pd, DataPtr->frame, NULL);
+ epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd), DataPtr->frame, NULL);
add_byte_views(&(DataPtr->edt), DataPtr->tree_view, DataPtr->bv_nb_ptr);
proto_tree_draw(DataPtr->edt.tree, DataPtr->tree_view);
}
memcpy(DataPtr->pd, buffer_start_ptr(&cfile.buf), DataPtr->frame->cap_len);
epan_dissect_init(&(DataPtr->edt), TRUE, TRUE);
- epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, DataPtr->pd,
+ epan_dissect_run(&(DataPtr->edt), &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd),
DataPtr->frame, &cfile.cinfo);
epan_dissect_fill_in_columns(&(DataPtr->edt), FALSE, TRUE);
#include <epan/tap.h>
#include "../globals.h"
+#include "../frame_tvbuff.h"
#include "ui/simple_dialog.h"
#include "../stat_menu.h"
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run_with_taps(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);
#include "ui/gtk/old-gtk-compat.h"
+#include "frame_tvbuff.h"
+
enum
{
PACKET_COLUMN,
return; /* error reading the frame */
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
/* if it is not an rtp frame, show the rtpstream dialog */
frame_matched = dfilter_apply_edt(sfcode, &edt);
#include "ui/gtk/sctp_stat.h"
#include "ui/gtk/gtkglobals.h"
+#include "frame_tvbuff.h"
+
static sctp_assoc_info_t static_assoc;
void
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
frame_matched = dfilter_apply_edt(sfcode, &edt);
/* if it is not an sctp frame, show the dialog */
#include "ui/gtk/old-gtk-compat.h"
+#include "frame_tvbuff.h"
+
#define TCP_SYN(flags) ( flags & TH_SYN )
#define TCP_ACK(flags) ( flags & TH_ACK )
#define TCP_FIN(flags) ( flags & TH_FIN )
epan_dissect_init(&edt, TRUE, FALSE);
epan_dissect_prime_dfilter(&edt, sfcode);
- epan_dissect_run_with_taps(&edt, &cf->phdr, buffer_start_ptr(&cf->buf), fdata, NULL);
+ epan_dissect_run_with_taps(&edt, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);
#include "wsutil/str_util.h"
+#include "frame_tvbuff.h"
+
#include <QTreeWidget>
#include <QTabWidget>
#include <QTextEdit>
epan_dissect_init(&edt, have_custom_cols(&cap_file_->cinfo), FALSE);
col_custom_prime_edt(&edt, &cap_file_->cinfo);
- epan_dissect_run(&edt, &cap_file_->phdr, buffer_start_ptr(&cap_file_->buf), fdata, &cap_file_->cinfo);
+ epan_dissect_run(&edt, &cap_file_->phdr, frame_tvbuff_new_buffer(fdata, &cap_file_->buf), fdata, &cap_file_->cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
if ((cap_file_->cinfo.col_custom_occurrence[ctx_column_]) ||
#include "color.h"
#include "color_filters.h"
+#include "frame_tvbuff.h"
#include "wireshark_application.h"
#include <QColor>
if (dissect_columns)
col_custom_prime_edt(&edt, cinfo);
- epan_dissect_run(&edt, &phdr, buffer_start_ptr(&buf), fdata, cinfo);
+ epan_dissect_run(&edt, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, cinfo);
if (enable_color_)
fdata->color_filter = color_filters_colorize_packet(&edt);