Have the frame_tvbuff.c routines not use the global cfile.

Have the routines that create them take a pointer to a struct
packet_provider_data, store that in the tvbuff data, and use it to get
the wtap from which packets are being read.

While we're at it, don't include globals.h in any header files, and
include it in source files iff the source file actually uses cfile.  Add
whatever includes that requires.

Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229
Reviewed-on: https://code.wireshark.org/review/24733
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-12-08 00:30:55 -08:00
parent f29b3deb6d
commit 8aa14236f8
91 changed files with 259 additions and 104 deletions

View File

@ -75,7 +75,6 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include "globals.h"
#include "file.h"
#include "ui/capture.h"

View File

@ -30,6 +30,9 @@
#include <glib.h>
#include <epan/tvbuff.h>
#include <epan/packet_info.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

View File

@ -24,6 +24,7 @@
#define __TAP_H__
#include <epan/epan.h>
#include <epan/packet_info.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus

52
file.c
View File

@ -1103,7 +1103,9 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
}
/* Dissect the frame. */
epan_dissect_run_with_taps(edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, buf), fdata, cinfo);
epan_dissect_run_with_taps(edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, buf),
fdata, cinfo);
/* If we don't have a display filter, set "passed_dfilter" to 1. */
if (dfcode != NULL) {
@ -1177,7 +1179,9 @@ read_packet(capture_file *cf, dfilter_t *dfcode, epan_dissect_t *edt,
epan_dissect_init(&rf_edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&rf_edt, cf->rfcode);
epan_dissect_run(&rf_edt, cf->cd_t, phdr, frame_tvbuff_new(&fdlocal, buf), &fdlocal, NULL);
epan_dissect_run(&rf_edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, &fdlocal, buf),
&fdlocal, NULL);
passed = dfilter_apply_edt(cf->rfcode, &rf_edt);
epan_dissect_cleanup(&rf_edt);
}
@ -2072,7 +2076,9 @@ retap_packet(capture_file *cf, frame_data *fdata,
{
retap_callback_args_t *args = (retap_callback_args_t *)argsp;
epan_dissect_run_with_taps(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, args->cinfo);
epan_dissect_run_with_taps(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd),
fdata, args->cinfo);
epan_dissect_reset(&args->edt);
return TRUE;
@ -2182,10 +2188,13 @@ print_packet(capture_file *cf, frame_data *fdata,
information. */
if (args->print_args->print_summary) {
col_custom_prime_edt(&args->edt, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd),
fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&args->edt, FALSE, TRUE);
} else
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd), fdata, NULL);
if (args->print_formfeed) {
if (!new_page(args->print_args->stream))
@ -2501,7 +2510,8 @@ write_pdml_packet(capture_file *cf, frame_data *fdata,
write_packet_callback_args_t *args = (write_packet_callback_args_t *)argsp;
/* Create the protocol tree, but don't fill in the column information. */
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd), fdata, NULL);
/* Write out the information in that tree. */
write_pdml_proto_tree(NULL, NULL, PF_NONE, &args->edt, args->fh, FALSE);
@ -2577,7 +2587,9 @@ write_psml_packet(capture_file *cf, frame_data *fdata,
/* Fill in the column information */
col_custom_prime_edt(&args->edt, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd),
fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&args->edt, FALSE, TRUE);
/* Write out the column information. */
@ -2660,7 +2672,9 @@ write_csv_packet(capture_file *cf, frame_data *fdata,
/* Fill in the column information */
col_custom_prime_edt(&args->edt, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, &cf->cinfo);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd),
fdata, &cf->cinfo);
epan_dissect_fill_in_columns(&args->edt, FALSE, TRUE);
/* Write out the column information. */
@ -2733,7 +2747,8 @@ carrays_write_packet(capture_file *cf, frame_data *fdata,
{
write_packet_callback_args_t *args = (write_packet_callback_args_t *)argsp;
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd), fdata, NULL);
write_carrays_hex_data(fdata->num, args->fh, &args->edt);
epan_dissect_reset(&args->edt);
@ -2795,7 +2810,8 @@ write_json_packet(capture_file *cf, frame_data *fdata,
write_packet_callback_args_t *args = (write_packet_callback_args_t *)argsp;
/* Create the protocol tree, but don't fill in the column information. */
epan_dissect_run(&args->edt, cf->cd_t, phdr, frame_tvbuff_new(fdata, pd), fdata, NULL);
epan_dissect_run(&args->edt, cf->cd_t, phdr,
frame_tvbuff_new(&cf->provider, fdata, pd), fdata, NULL);
/* Write out the information in that tree. */
write_json_proto_tree(NULL, args->print_args->print_dissections,
@ -2902,7 +2918,9 @@ match_protocol_tree(capture_file *cf, frame_data *fdata, void *criterion)
/* Construct the protocol tree, including the displayed text */
epan_dissect_init(&edt, cf->epan, TRUE, TRUE);
/* We don't need the column information */
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
/* Iterate through all the nodes, seeing if they have text that matches. */
mdata->cf = cf;
@ -3014,8 +3032,9 @@ match_summary_line(capture_file *cf, frame_data *fdata, void *criterion)
/* Don't bother constructing the protocol tree */
epan_dissect_init(&edt, cf->epan, FALSE, FALSE);
/* Get the column information */
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata,
&cf->cinfo);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, &cf->cinfo);
/* Find the Info column */
for (colx = 0; colx < cf->cinfo.num_cols; colx++) {
@ -3360,7 +3379,9 @@ match_dfilter(capture_file *cf, frame_data *fdata, void *criterion)
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
result = dfilter_apply_edt(sfcode, &edt) ? MR_MATCHED : MR_NOTMATCHED;
epan_dissect_cleanup(&edt);
return result;
@ -3646,7 +3667,8 @@ cf_select_packet(capture_file *cf, int row)
cf->edt = epan_dissect_new(cf->epan, TRUE, TRUE);
tap_build_interesting(cf->edt);
epan_dissect_run(cf->edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(cf->current_frame, &cf->buf),
epan_dissect_run(cf->edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, cf->current_frame, &cf->buf),
cf->current_frame, NULL);
dfilter_macro_build_ftv_cache(cf->edt->tree);

View File

@ -21,7 +21,6 @@
#include <wsutil/file_util.h>
#include <wsutil/filesystem.h>
#include "globals.h"
#include <epan/strutil.h>

View File

@ -17,7 +17,6 @@
#include <epan/tvbuff.h>
#include "frame_tvbuff.h"
#include "globals.h"
#include "wiretap/wtap-int.h" /* for ->random_fh */
@ -26,7 +25,7 @@ struct tvb_frame {
Buffer *buf; /* Packet data */
wtap *wth; /**< Wiretap session */
const struct packet_provider_data *prov; /* provider of packet information */
gint64 file_off; /**< File offset */
guint offset;
@ -38,14 +37,10 @@ frame_read(struct tvb_frame *frame_tvb, struct wtap_pkthdr *phdr, Buffer *buf)
int err;
gchar *err_info;
/* sanity check, capture file was closed? */
if (cfile.provider.wth != frame_tvb->wth)
return FALSE;
/* XXX, what if phdr->caplen isn't equal to
* frame_tvb->tvb.length + frame_tvb->offset?
*/
if (!wtap_seek_read(frame_tvb->wth, frame_tvb->file_off, phdr, buf, &err, &err_info)) {
if (!wtap_seek_read(frame_tvb->prov->wth, frame_tvb->file_off, phdr, buf, &err, &err_info)) {
/* XXX - report error! */
switch (err) {
case WTAP_ERR_BAD_FILE:
@ -165,7 +160,8 @@ static const struct tvb_ops tvb_frame_ops = {
/* based on tvb_new_real_data() */
tvbuff_t *
frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
frame_tvbuff_new(const struct packet_provider_data *prov, const frame_data *fd,
const guint8 *buf)
{
struct tvb_frame *frame_tvb;
tvbuff_t *tvb;
@ -208,12 +204,12 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
frame_tvb = (struct tvb_frame *) tvb;
/* XXX, wtap_can_seek() */
if (cfile.provider.wth && cfile.provider.wth->random_fh) {
frame_tvb->wth = cfile.provider.wth;
if (prov->wth && prov->wth->random_fh) {
frame_tvb->prov = prov;
frame_tvb->file_off = fd->file_off;
frame_tvb->offset = 0;
} else
frame_tvb->wth = NULL;
frame_tvb->prov = NULL;
frame_tvb->buf = NULL;
@ -221,9 +217,10 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
}
tvbuff_t *
frame_tvbuff_new_buffer(const frame_data *fd, Buffer *buf)
frame_tvbuff_new_buffer(const struct packet_provider_data *prov,
const frame_data *fd, Buffer *buf)
{
return frame_tvbuff_new(fd, ws_buffer_start_ptr(buf));
return frame_tvbuff_new(prov, fd, ws_buffer_start_ptr(buf));
}
static tvbuff_t *
@ -235,7 +232,7 @@ frame_clone(tvbuff_t *tvb, guint abs_offset, guint abs_length)
struct tvb_frame *cloned_frame_tvb;
/* file not seekable */
if (!frame_tvb->wth)
if (!frame_tvb->prov)
return NULL;
abs_offset += frame_tvb->offset;
@ -255,7 +252,7 @@ frame_clone(tvbuff_t *tvb, guint abs_offset, guint abs_length)
cloned_tvb->ds_tvb = cloned_tvb;
cloned_frame_tvb = (struct tvb_frame *) cloned_tvb;
cloned_frame_tvb->wth = frame_tvb->wth;
cloned_frame_tvb->prov = frame_tvb->prov;
cloned_frame_tvb->file_off = frame_tvb->file_off;
cloned_frame_tvb->offset = abs_offset;
cloned_frame_tvb->buf = NULL;
@ -266,7 +263,8 @@ frame_clone(tvbuff_t *tvb, guint abs_offset, guint abs_length)
/* based on tvb_new_real_data() */
tvbuff_t *
file_tvbuff_new(const frame_data *fd, const guint8 *buf)
file_tvbuff_new(const struct packet_provider_data *prov, const frame_data *fd,
const guint8 *buf)
{
struct tvb_frame *frame_tvb;
tvbuff_t *tvb;
@ -309,12 +307,12 @@ file_tvbuff_new(const frame_data *fd, const guint8 *buf)
frame_tvb = (struct tvb_frame *) tvb;
/* XXX, wtap_can_seek() */
if (cfile.provider.wth && cfile.provider.wth->random_fh) {
frame_tvb->wth = cfile.provider.wth;
if (prov->wth && prov->wth->random_fh) {
frame_tvb->prov = prov;
frame_tvb->file_off = fd->file_off;
frame_tvb->offset = 0;
} else
frame_tvb->wth = NULL;
frame_tvb->prov = NULL;
frame_tvb->buf = NULL;
@ -322,9 +320,10 @@ file_tvbuff_new(const frame_data *fd, const guint8 *buf)
}
tvbuff_t *
file_tvbuff_new_buffer(const frame_data *fd, Buffer *buf)
file_tvbuff_new_buffer(const struct packet_provider_data *prov,
const frame_data *fd, Buffer *buf)
{
return frame_tvbuff_new(fd, ws_buffer_start_ptr(buf));
return frame_tvbuff_new(prov, fd, ws_buffer_start_ptr(buf));
}
/*

View File

@ -11,19 +11,25 @@
#ifndef __FRAME_TVBUFF_H__
#define __FRAME_TVBUFF_H__
#include "cfile.h"
#include <wiretap/wtap.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <wiretap/wtap.h>
extern tvbuff_t *frame_tvbuff_new(const struct packet_provider_data *prov,
const frame_data *fd, const guint8 *buf);
extern tvbuff_t *frame_tvbuff_new(const frame_data *fd, const guint8 *buf);
extern tvbuff_t *frame_tvbuff_new_buffer(const struct packet_provider_data *prov,
const frame_data *fd, Buffer *buf);
extern tvbuff_t *frame_tvbuff_new_buffer(const frame_data *fd, Buffer *buf);
extern tvbuff_t *file_tvbuff_new(const struct packet_provider_data *prov,
const frame_data *fd, const guint8 *buf);
extern tvbuff_t *file_tvbuff_new(const frame_data *fd, const guint8 *buf);
extern tvbuff_t *file_tvbuff_new_buffer(const frame_data *fd, Buffer *buf);
extern tvbuff_t *file_tvbuff_new_buffer(const struct packet_provider_data *prov,
const frame_data *fd, Buffer *buf);
#ifdef __cplusplus
}

View File

@ -1037,7 +1037,9 @@ process_packet(capture_file *cf, epan_dissect_t *edt, gint64 offset,
/* 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, cf->cd_t, whdr, frame_tvbuff_new(&fdata, pd), &fdata, &cf->cinfo);
epan_dissect_run_with_taps(edt, cf->cd_t, whdr,
frame_tvbuff_new(&cf->provider, &fdata, pd),
&fdata, &cf->cinfo);
frame_data_set_after_dissect(&fdata, &cum_bytes);
prev_dis_frame = fdata;

View File

@ -301,7 +301,9 @@ process_packet(capture_file *cf, epan_dissect_t *edt,
cf->provider.ref = &ref_frame;
}
epan_dissect_run(edt, cf->cd_t, whdr, frame_tvbuff_new(&fdlocal, pd), &fdlocal, NULL);
epan_dissect_run(edt, cf->cd_t, whdr,
frame_tvbuff_new(&cf->provider, &fdlocal, pd),
&fdlocal, NULL);
/* Run the read filter if we have one. */
if (cf->rfcode)
@ -569,7 +571,9 @@ sharkd_dissect_request(unsigned int framenum, void (*cb)(epan_dissect_t *, proto
* XXX - need to catch an OutOfMemoryError exception and
* attempt to recover from it.
*/
epan_dissect_run(&edt, cfile.cd_t, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, cinfo);
epan_dissect_run(&edt, cfile.cd_t, &phdr,
frame_tvbuff_new_buffer(&cfile.provider, fdata, &buf),
fdata, cinfo);
if (cinfo) {
/* "Stringify" non frame_data vals */
@ -621,7 +625,9 @@ sharkd_dissect_columns(frame_data *fdata, column_info *cinfo, gboolean dissect_c
* XXX - need to catch an OutOfMemoryError exception and
* attempt to recover from it.
*/
epan_dissect_run(&edt, cfile.cd_t, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, cinfo);
epan_dissect_run(&edt, cfile.cd_t, &phdr,
frame_tvbuff_new_buffer(&cfile.provider, fdata, &buf),
fdata, cinfo);
if (cinfo) {
/* "Stringify" non frame_data vals */
@ -678,7 +684,9 @@ sharkd_retap(void)
if (!wtap_seek_read(cfile.provider.wth, fdata->file_off, &phdr, &buf, &err, &err_info))
break;
epan_dissect_run_with_taps(&edt, cfile.cd_t, &phdr, frame_tvbuff_new(fdata, ws_buffer_start_ptr(&buf)), fdata, cinfo);
epan_dissect_run_with_taps(&edt, cfile.cd_t, &phdr,
frame_tvbuff_new(&cfile.provider, fdata, ws_buffer_start_ptr(&buf)),
fdata, cinfo);
epan_dissect_reset(&edt);
}
@ -736,7 +744,9 @@ sharkd_filter(const char *dftext, guint8 **result)
/* frame_data_set_before_dissect */
epan_dissect_prime_with_dfilter(&edt, dfcode);
epan_dissect_run(&edt, cfile.cd_t, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, NULL);
epan_dissect_run(&edt, cfile.cd_t, &phdr,
frame_tvbuff_new_buffer(&cfile.provider, fdata, &buf),
fdata, NULL);
if (dfilter_apply_edt(dfcode, &edt))
passed_bits |= (1 << (framenum % 8));

View File

@ -13,7 +13,6 @@
#define __SHARKD_H
#include <file.h>
#include <globals.h>
/* sharkd.c */
cf_status_t sharkd_cf_open(const char *fname, unsigned int type, gboolean is_tempfile, int *err);

View File

@ -69,6 +69,8 @@
#include <wsutil/glib-compat.h>
#include <wsutil/strtoi.h>
#include "globals.h"
#include "sharkd.h"
static gboolean

View File

@ -1101,7 +1101,9 @@ process_packet_first_pass(capture_file *cf, epan_dissect_t *edt,
cf->provider.ref = &ref_frame;
}
epan_dissect_file_run(edt, whdr, file_tvbuff_new(&fdlocal, pd), &fdlocal, NULL);
epan_dissect_file_run(edt, whdr,
file_tvbuff_new(&cf->provider, &fdlocal, pd),
&fdlocal, NULL);
/* Run the read filter if we have one. */
if (cf->rfcode)
@ -1180,7 +1182,8 @@ process_packet_second_pass(capture_file *cf, epan_dissect_t *edt,
cf->provider.ref = &ref_frame;
}
epan_dissect_file_run_with_taps(edt, phdr, file_tvbuff_new_buffer(fdata, buf), fdata, cinfo);
epan_dissect_file_run_with_taps(edt, phdr,
file_tvbuff_new_buffer(&cf->provider, fdata, buf), fdata, cinfo);
/* Run the read/display filter if we have one. */
if (cf->dfcode)
@ -1623,7 +1626,9 @@ process_packet_single_pass(capture_file *cf, epan_dissect_t *edt, gint64 offset,
cf->provider.ref = &ref_frame;
}
epan_dissect_file_run_with_taps(edt, whdr, frame_tvbuff_new(&fdata, pd), &fdata, cinfo);
epan_dissect_file_run_with_taps(edt, whdr,
frame_tvbuff_new(&cf->provider, &fdata, pd),
&fdata, cinfo);
/* Run the filter if we have it. */
if (cf->dfcode)

View File

@ -2912,7 +2912,9 @@ process_packet_first_pass(capture_file *cf, epan_dissect_t *edt,
cf->provider.ref = &ref_frame;
}
epan_dissect_run(edt, cf->cd_t, whdr, frame_tvbuff_new(&fdlocal, pd), &fdlocal, NULL);
epan_dissect_run(edt, cf->cd_t, whdr,
frame_tvbuff_new(&cf->provider, &fdlocal, pd),
&fdlocal, NULL);
/* Run the read filter if we have one. */
if (cf->rfcode)
@ -3002,7 +3004,9 @@ process_packet_second_pass(capture_file *cf, epan_dissect_t *edt,
fdata->flags.need_colorize = 1;
}
epan_dissect_run_with_taps(edt, cf->cd_t, phdr, frame_tvbuff_new_buffer(fdata, buf), fdata, cinfo);
epan_dissect_run_with_taps(edt, cf->cd_t, phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, buf),
fdata, cinfo);
/* Run the read/display filter if we have one. */
if (cf->dfcode)
@ -3517,7 +3521,9 @@ process_packet_single_pass(capture_file *cf, epan_dissect_t *edt, gint64 offset,
fdata.flags.need_colorize = 1;
}
epan_dissect_run_with_taps(edt, cf->cd_t, whdr, frame_tvbuff_new(&fdata, pd), &fdata, cinfo);
epan_dissect_run_with_taps(edt, cf->cd_t, whdr,
frame_tvbuff_new(&cf->provider, &fdata, pd),
&fdata, cinfo);
/* Run the filter if we have it. */
if (cf->dfcode)

View File

@ -37,6 +37,8 @@
#include "ui/gtk/main.h"
#include "ui/gtk/addr_resolution_dlg.h"
#include "globals.h"
static GtkWidget *addr_resolution_dlg_w = NULL;

View File

@ -89,6 +89,8 @@
#include "ui/gtk/extcap_gtk.h"
#endif
#include "globals.h"
/*
* Symbolic names for column indices.
*/

View File

@ -23,6 +23,8 @@
#ifndef __CAPTURE_FILE_DLG_H__
#define __CAPTURE_FILE_DLG_H__
#include "cfile.h"
/** @file
* "Open" / "Close" / "Save" / "Save As" / etc dialog boxes.
* @ingroup dialog_group

View File

@ -29,7 +29,6 @@
#include <epan/addr_resolv.h>
#include <epan/stat_groups.h>
#include "ui/simple_dialog.h"
@ -49,6 +48,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
#define COL_STR_LEN 16
#define CONV_PTR_KEY "conversations-pointer"
#define NB_PAGES_KEY "notebook-pages"

View File

@ -39,7 +39,6 @@
#include <epan/tap.h>
#include <epan/dissectors/packet-dcerpc.h>
#include "ui/simple_dialog.h"
#include "ui/gtk/gui_stat_menu.h"
@ -54,6 +53,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void register_tap_listener_gtkdcerpcstat(void);
/* used to keep track of the statistics for an entire program interface */

View File

@ -47,6 +47,8 @@
#include "ui/gtk/packet_win.h"
#include "ui/gtk/stock_icons.h"
#include "globals.h"
#undef DEBUG
/**************************************************/

View File

@ -45,6 +45,7 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
enum { DND_TARGET_STRING, DND_TARGET_ROOTWIN, DND_TARGET_URL };

View File

@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include "ui/main_statusbar.h"
#include "ui/gtk/dlg_utils.h"
@ -37,6 +36,8 @@
#include "ui/gtk/packet_list.h"
#include "ui/gtk/edit_packet_comment_dlg.h"
#include "globals.h"
static GtkWidget *edit_or_add_pkt_comment_dlg = NULL;
static GtkWidget *edit_or_add_capture_comment_dlg = NULL;

View File

@ -49,6 +49,8 @@
#include "ui/gtk/edit_packet_comment_dlg.h"
#include "ui/gtk/gtkglobals.h"
#include "globals.h"
void register_tap_listener_expert_comp(void);
enum

View File

@ -51,6 +51,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
const char *packet = "Packet:";
enum

View File

@ -35,6 +35,8 @@
#include <ui/export_object_ui.h>
#include <ui/simple_dialog.h>
#include "globals.h"
#include "dlg_utils.h"
#include "file_dlg.h"
#include "gui_utils.h"

View File

@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include "globals.h"
#include <wiretap/pcap-encap.h>
#include <epan/exported_pdu.h>

View File

@ -25,6 +25,7 @@
#include "config.h"
#include <string.h>
#include <errno.h>
#include <wsutil/file_util.h>
#include <wsutil/str_util.h>

View File

@ -27,7 +27,7 @@
#include "ui/gtk/fileset_dlg.h"
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
/*
* Keep a static pointer to the current "File Set" window, if

View File

@ -41,6 +41,7 @@
#include "ui/gtk/filter_autocomplete.h"
#include "ui/gtk/help_dlg.h"
#include "globals.h"
#include "main.h"

View File

@ -23,7 +23,6 @@
#ifndef __FILTER_EXPRESSIONS_SAVE_DLG_H__
#define __FILTER_EXPRESSIONS_SAVE_DLG_H__
#include "globals.h"
#include "epan/filter_expressions.h"
enum {

View File

@ -32,6 +32,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void
apply_selected_filter (guint callback_action, const char *filter)
{

View File

@ -50,6 +50,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/firewall_dlg.h"
#include "globals.h"
#define MAX_RULE_LEN 200
/* Copied from packet_info struct */

View File

@ -26,7 +26,6 @@
#include "config.h"
#include <string.h>
#include <epan/packet.h>
#include <epan/stat_tap_ui.h>
@ -39,6 +38,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/gtkglobals.h"
#include "globals.h"
void register_tap_listener_flow_graph(void);
static seq_analysis_info_t *graph_analysis = NULL;

View File

@ -63,6 +63,8 @@
#include "ui/win32/print_win32.h"
#endif
#include "globals.h"
/* static variable declarations to speed up the performance
* of follow_load_text and follow_add_to_gtk_text
*/

View File

@ -56,6 +56,8 @@
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void register_tap_listener_gtkfunnel(void);
struct _funnel_text_window_t {

View File

@ -64,6 +64,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
#include "globals.h"
/****************************************************************************/
#define MAX_LABEL 50

View File

@ -56,6 +56,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
#define HOST_PTR_KEY "hostlist-pointer"
#define NB_PAGES_KEY "notebook-pages"
#define HL_DLG_HEIGHT 550

View File

@ -79,6 +79,8 @@
#include "frame_tvbuff.h"
#include "globals.h"
void register_tap_listener_iax2_analysis(void);
enum
@ -3568,7 +3570,8 @@ void iax2_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
/* if it is not an iax2 packet, show an error dialog */
if (!dfilter_apply_edt(sfcode, &edt)) {

View File

@ -46,6 +46,7 @@
#include "ui/gtk/filter_autocomplete.h"
#include "ui/main_statusbar.h"
#include "globals.h"
void register_tap_listener_gtk_iostat(void);

View File

@ -44,6 +44,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void register_tap_listener_mac_lte_stat(void);
/**********************************************/

View File

@ -533,7 +533,8 @@ get_ip_address_list_from_packet_list_row(gpointer data)
col_custom_prime_edt(&edt, &cfile.cinfo);
epan_dissect_run(&edt, cfile.cd_t, &cfile.phdr,
frame_tvbuff_new_buffer(fdata, &cfile.buf), fdata, &cfile.cinfo);
frame_tvbuff_new_buffer(&cfile.provider, fdata, &cfile.buf),
fdata, &cfile.cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
/* First check selected column */
@ -574,7 +575,7 @@ get_filter_from_packet_list_row_and_column(gpointer data)
col_custom_prime_edt(&edt, &cfile.cinfo);
epan_dissect_run(&edt, cfile.cd_t, &cfile.phdr,
frame_tvbuff_new_buffer(fdata, &cfile.buf),
frame_tvbuff_new_buffer(&cfile.provider, fdata, &cfile.buf),
fdata, &cfile.cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);

View File

@ -23,7 +23,7 @@
#ifndef __MAIN_H__
#define __MAIN_H__
#include "globals.h"
#include "cfile.h"
#include "capture_opts.h"
/** @defgroup main_window_group Main window

View File

@ -51,6 +51,8 @@
#include "main_filter_toolbar.h"
#include "filter_expression_save_dlg.h"
#include "globals.h"
#define MENU_BAR_PATH_FILE_OPEN "/Menubar/FileMenu/Open"
#define MENU_BAR_PATH_EDIT_COPY_AS_FLT "/Menubar/EditMenu/Copy/AsFilter"
#define MENU_BAR_PATH_ANALYZE_DISPLAY_FLT "/Menubar/AnalyzeMenu/DisplayFilters"

View File

@ -65,6 +65,8 @@
#include "ui/gtk/menus.h"
#include "ui/gtk/edit_packet_comment_dlg.h"
#include "globals.h"
/*
* The order below defines the priority of info bar contexts.
*/

View File

@ -59,6 +59,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
static gboolean toolbar_init = FALSE;
#ifdef HAVE_LIBPCAP

View File

@ -21,6 +21,7 @@
#include "config.h"
#include <errno.h>
#include <gtk/gtk.h>
@ -79,6 +80,8 @@
#include "airpcap_gui_utils.h"
#endif
#include "file.h"
/* XXX */
static GtkWidget *welcome_hb = NULL;
static GtkWidget *header_lb = NULL;

View File

@ -39,6 +39,8 @@
#include "ui/gtk/packet_win.h"
#include "simple_dialog.h"
#include "globals.h"
GtkWidget *man_addr_resolv_dlg = NULL;
static void

View File

@ -22,13 +22,12 @@
#include "config.h"
#include <gtk/gtk.h>
#include "ui/gtk/main.h"
#include "ui/gtk/packet_history.h"
#include "globals.h"
static GList *history_current = NULL;
static GList *history_list = NULL;

View File

@ -61,6 +61,8 @@
#include <wsutil/str_util.h>
#include "globals.h"
#define COLUMN_WIDTH_MIN 40
#define MAX_COMMENTS_TO_FETCH 20000000 /* Arbitrary */

View File

@ -1176,7 +1176,9 @@ packet_list_dissect_and_cache_record(PacketList *packet_list, PacketListRecord *
* XXX - need to catch an OutOfMemoryError exception and
* attempt to recover from it.
*/
epan_dissect_run(&edt, cfile.cd_t, &phdr, frame_tvbuff_new_buffer(fdata, &buf), fdata, cinfo);
epan_dissect_run(&edt, cfile.cd_t, &phdr,
frame_tvbuff_new_buffer(&cfile.provider, fdata, &buf),
fdata, cinfo);
if (dissect_columns) {
/* "Stringify" non frame_data vals */

View File

@ -71,6 +71,7 @@
#include "ui/gtk/old-gtk-compat.h"
#endif
#include "globals.h"
#define E_BYTE_VIEW_TREE_PTR "byte_view_tree_ptr"
#define E_BYTE_VIEW_TREE_VIEW_PTR "byte_view_tree_view_ptr"

View File

@ -68,6 +68,8 @@
#include "frame_tvbuff.h"
#include "globals.h"
#define BV_SIZE 75
#define TV_SIZE 95
@ -157,7 +159,9 @@ redissect_packet_window(gpointer object, gpointer user_data _U_)
proto_tree_draw(NULL, DataPtr->tree_view);
epan_dissect_cleanup(&(DataPtr->edt));
epan_dissect_init(&(DataPtr->edt), cfile.epan, TRUE, TRUE);
epan_dissect_run(&(DataPtr->edt), cfile.cd_t, &DataPtr->phdr, frame_tvbuff_new(DataPtr->frame, DataPtr->pd), DataPtr->frame, NULL);
epan_dissect_run(&(DataPtr->edt), cfile.cd_t, &DataPtr->phdr,
frame_tvbuff_new(&cfile.provider, 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);
@ -226,7 +230,7 @@ void new_packet_window(GtkWidget *w _U_, gboolean reference, gboolean editable _
epan_dissect_init(&(DataPtr->edt), cfile.epan, TRUE, TRUE);
epan_dissect_run(&(DataPtr->edt), cfile.cd_t, &DataPtr->phdr,
frame_tvbuff_new(DataPtr->frame, DataPtr->pd),
frame_tvbuff_new(&cfile.provider, DataPtr->frame, DataPtr->pd),
DataPtr->frame, &cfile.cinfo);
epan_dissect_fill_in_columns(&(DataPtr->edt), FALSE, TRUE);

View File

@ -66,6 +66,8 @@
#endif
#endif
#include "globals.h"
static void prefs_main_ok_cb(GtkWidget *, gpointer);
static void prefs_main_apply_cb(GtkWidget *, gpointer);
static void prefs_main_save_cb(GtkWidget *, gpointer);

View File

@ -43,6 +43,7 @@
#include "ui/gtk/webbrowser.h"
#include "ui/gtk/main_welcome.h"
#include "globals.h"
static gint fetch_enum_value(gpointer control, const enum_val_t *enumvals);
static gboolean fileopen_dir_changed_cb(GtkWidget *myentry, GdkEvent *event _U_, gpointer parent_w _U_);

View File

@ -35,6 +35,8 @@
#include "ui/util.h"
#include <wsutil/file_util.h>
#include "globals.h"
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/keys.h"
#include "ui/gtk/gui_utils.h"

View File

@ -23,6 +23,8 @@
#include "config.h"
#include <errno.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#if GTK_CHECK_VERSION(3,0,0)

View File

@ -29,10 +29,12 @@
# include <gdk/gdkkeysyms-compat.h>
#endif
#include <epan/packet.h>
#include <epan/prefs.h>
#include <wsutil/filesystem.h>
#include <epan/disabled_protos.h>
#include <wsutil/filesystem.h>
#include "ui/util.h"
#include "ui/gtk/main.h"
@ -42,6 +44,8 @@
#include "ui/gtk/help_dlg.h"
#include "simple_dialog.h"
#include "globals.h"
static gboolean set_proto_selection(GtkWidget *);
static gboolean revert_proto_selection(void);

View File

@ -42,6 +42,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
enum
{
TYPE_COLUMN,

View File

@ -54,6 +54,7 @@
#include "ui/recent.h"
#include "globals.h"
void register_tap_listener_rlc_lte_stat(void);

View File

@ -51,6 +51,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void register_tap_listener_gtkrpcstat(void);
/* used to keep track of the statistics for an entire program interface */

View File

@ -62,7 +62,6 @@
#include "ui/simple_dialog.h"
#include <wsutil/utf8_entities.h>
#include "ui/gtk/gtkglobals.h"
#include "ui/gtk/dlg_utils.h"
#include "ui/gtk/file_dlg.h"
@ -85,6 +84,8 @@
#include "frame_tvbuff.h"
#include "globals.h"
void register_tap_listener_rtp_analysis(void);
enum
@ -3899,7 +3900,9 @@ rtp_analysis_cb(GtkAction *action _U_, gpointer user_data _U_)
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_prime_with_hfid(&edt, hfid_rtp_ssrc);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
/*
* Packet must be an RTPv2 packet with an SSRC; we use the filter to

View File

@ -39,6 +39,8 @@
#include "frame_tvbuff.h"
#include "globals.h"
static sctp_assoc_info_t static_assoc;
void
@ -1001,7 +1003,9 @@ sctp_analyse_cb(struct sctp_analyse *u_data, gboolean ext)
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
/* if it is not an sctp packet, show the dialog */
if (!dfilter_apply_edt(sfcode, &edt)) {

View File

@ -40,6 +40,8 @@
#include "ui/gtk/stock_icons.h"
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
#define DEFAULT_PIXELS_PER_TICK 2
#define MAX_PIXELS_PER_TICK 4
#define AUTO_MAX_YSCALE 0

View File

@ -27,7 +27,6 @@
#include <string.h>
#include <epan/to_str.h>
#include <epan/value_string.h>
#include <epan/tap.h>
@ -41,6 +40,8 @@
#include "ui/gtk/main.h"
#include "ui/gtk/sctp_stat_gtk.h"
#include "globals.h"
void register_tap_listener_sctpstat(void);
static void sctpstat_init(const char *opt_arg, void *userdata);

View File

@ -28,12 +28,13 @@
#include "epan/to_str.h"
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/main.h"
#include "ui/gtk/sctp_stat_gtk.h"
#include "ui/gtk/stock_icons.h"
#include "globals.h"
static GtkWidget *clist = NULL;
static GList *last_list = NULL;
static sctp_assoc_info_t *selected_stream = NULL; /* current selection */

View File

@ -32,6 +32,8 @@
#include "ui/gtk/sctp_stat_gtk.h"
#include "ui/gtk/stock_icons.h"
#include "globals.h"
static GtkWidget *sctp_error_dlg=NULL;
static GtkWidget *clist = NULL;
static GList *last_list = NULL;

View File

@ -39,6 +39,8 @@
#include "ui/gtk/stock_icons.h"
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
#define DEFAULT_PIXELS_PER_TICK 2
#define MAX_PIXELS_PER_TICK 4
#define AUTO_MAX_YSCALE 0

View File

@ -38,6 +38,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
#include "globals.h"
static GtkWidget *sctp_stat_dlg = NULL;
static GtkWidget *clist = NULL;
static GList *last_list = NULL;

View File

@ -45,6 +45,8 @@
#include "epan/conversation.h"
#include "epan/dissectors/packet-scsi.h"
#include "globals.h"
#define NANOSECS_PER_SEC 1000000000
enum

View File

@ -42,6 +42,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
typedef struct _gtk_simplestat_t {
GtkWidget *vbox;
GtkWidget *win;

View File

@ -62,6 +62,8 @@
#include "ui/win32/file_dlg_win32.h"
#endif
#include "globals.h"
void register_tap_listener_stats_tree_stat(void);
struct _st_node_pres {

View File

@ -26,8 +26,6 @@
#include <gtk/gtk.h>
#include <version_info.h>
#include "../../file.h"
@ -45,6 +43,8 @@
#include "ui/gtk/help_dlg.h"
#include "ui/gtk/packet_list.h"
#include "globals.h"
#define SUM_STR_MAX 1024
#define FILTER_SNIP_LEN 50
#define SHB_STR_SNIP_LEN 50

View File

@ -27,17 +27,14 @@
#include <gtk/gtk.h>
#include <epan/proto.h>
#include <epan/prefs.h>
#include "../../globals.h"
#include "ui/gtk/supported_protos_dlg.h"
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/dlg_utils.h"
#include "ui/gtk/font_utils.h"
static const char *proto_supported =
"The following %d protocols (and packet types) are currently\n"
"supported by Wireshark:\n\n";

View File

@ -68,6 +68,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/packet_win.h"
#include "globals.h"
# define BUTTON_SIZE_X -1
# define BUTTON_SIZE_Y -1

View File

@ -50,6 +50,8 @@
#include "ui/gtk/old-gtk-compat.h"
#include "globals.h"
void register_tap_listener_wlanstat(void);
enum {

View File

@ -165,7 +165,9 @@ process_record(capture_file *cf, frame_data *frame, column_info *cinfo, ph_stats
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
/* Don't fake protocols. We need them for the protocol hierarchy */
epan_dissect_fake_protocols(&edt, FALSE);
epan_dissect_run(&edt, cf->cd_t, &phdr, frame_tvbuff_new_buffer(frame, &buf), frame, cinfo);
epan_dissect_run(&edt, cf->cd_t, &phdr,
frame_tvbuff_new_buffer(&cf->provider, frame, &buf),
frame, cinfo);
/* Get stats from this protocol tree */
process_tree(edt.tree, ps);

View File

@ -83,7 +83,8 @@ void AddressEditorFrame::editAddresses(CaptureFile &cf, int column)
col_custom_prime_edt(&edt, &cap_file_->cinfo);
epan_dissect_run(&edt, cap_file_->cd_t, &cap_file_->phdr,
frame_tvbuff_new_buffer(cap_file_->current_frame, &cap_file_->buf), cap_file_->current_frame, &cap_file_->cinfo);
frame_tvbuff_new_buffer(&cap_file_->provider, cap_file_->current_frame, &cap_file_->buf),
cap_file_->current_frame, &cap_file_->cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
/* First check selected column */

View File

@ -25,7 +25,6 @@
#include "export_pdu_dialog.h"
#include <ui_export_pdu_dialog.h>
#include "globals.h"
#include <wiretap/pcap-encap.h>
#include <epan/tap.h>

View File

@ -30,7 +30,6 @@
#include <glib.h>
#include "globals.h"
#include "summary.h"
#include <epan/packet.h>

View File

@ -335,7 +335,8 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
epan_dissect_init(&edt, cap_file_.capFile()->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run(&edt, cap_file_.capFile()->cd_t, &cap_file_.capFile()->phdr,
frame_tvbuff_new_buffer(fdata, &cap_file_.capFile()->buf), fdata, NULL);
frame_tvbuff_new_buffer(&cap_file_.capFile()->provider, fdata, &cap_file_.capFile()->buf),
fdata, NULL);
// This shouldn't happen (the menu item should be disabled) but check anyway
if (!dfilter_apply_edt(sfcode, &edt)) {

View File

@ -40,8 +40,6 @@
#include "wireshark_application.h"
#include "simple_dialog.h"
#include "globals.h"
#include <epan/dissectors/packet-rlc-lte.h>
#include <ui/tap-rlc-graph.h>

View File

@ -185,7 +185,9 @@ void PacketListRecord::dissect(capture_file *cap_file, bool dissect_color)
* XXX - need to catch an OutOfMemoryError exception and
* attempt to recover from it.
*/
epan_dissect_run(&edt, cap_file->cd_t, &phdr, frame_tvbuff_new_buffer(fdata_, &buf), fdata_, cinfo);
epan_dissect_run(&edt, cap_file->cd_t, &phdr,
frame_tvbuff_new_buffer(&cap_file->provider, fdata_, &buf),
fdata_, cinfo);
if (dissect_columns) {
/* "Stringify" non frame_data vals */

View File

@ -30,7 +30,6 @@
#include <glib.h>
#include "globals.h"
#include "summary.h"
#include <epan/tap.h>

View File

@ -63,7 +63,7 @@ PacketDialog::PacketDialog(QWidget &parent, CaptureFile &cf, frame_data *fdata)
col_custom_prime_edt(&edt_, &(cap_file_.capFile()->cinfo));
epan_dissect_run(&edt_, cap_file_.capFile()->cd_t, &phdr_,
frame_tvbuff_new(fdata, packet_data_),
frame_tvbuff_new(&cap_file_.capFile()->provider, fdata, packet_data_),
fdata, &(cap_file_.capFile()->cinfo));
epan_dissect_fill_in_columns(&edt_, TRUE, TRUE);

View File

@ -1024,7 +1024,9 @@ QString PacketList::getFilterFromRowAndColumn()
epan_dissect_init(&edt, cap_file_->epan, have_custom_cols(&cap_file_->cinfo), FALSE);
col_custom_prime_edt(&edt, &cap_file_->cinfo);
epan_dissect_run(&edt, cap_file_->cd_t, &cap_file_->phdr, frame_tvbuff_new_buffer(fdata, &cap_file_->buf), fdata, &cap_file_->cinfo);
epan_dissect_run(&edt, cap_file_->cd_t, &cap_file_->phdr,
frame_tvbuff_new_buffer(&cap_file_->provider, fdata, &cap_file_->buf),
fdata, &cap_file_->cinfo);
epan_dissect_fill_in_columns(&edt, TRUE, TRUE);
if ((cap_file_->cinfo.columns[ctx_column_].col_custom_occurrence) ||

View File

@ -1607,7 +1607,8 @@ void RtpAnalysisDialog::findStreams()
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_prime_with_hfid(&edt, hfid_rtp_ssrc);
epan_dissect_run(&edt, cap_file_.capFile()->cd_t, &cap_file_.capFile()->phdr,
frame_tvbuff_new_buffer(fdata, &cap_file_.capFile()->buf), fdata, NULL);
frame_tvbuff_new_buffer(&cap_file_.capFile()->provider, fdata, &cap_file_.capFile()->buf),
fdata, NULL);
/*
* Packet must be an RTPv2 packet with an SSRC; we use the filter to

View File

@ -61,7 +61,7 @@ void FrameInformation::loadFrameTree()
col_custom_prime_edt(&edt_, &(cap_file_->capFile()->cinfo));
epan_dissect_run(&edt_, cap_file_->capFile()->cd_t, &phdr_,
frame_tvbuff_new(fi_, packet_data_),
frame_tvbuff_new(&cap_file_->capFile()->provider, fi_, packet_data_),
fi_, &(cap_file_->capFile()->cinfo));
epan_dissect_fill_in_columns(&edt_, TRUE, TRUE);
}

View File

@ -146,7 +146,9 @@ rlc_lte_tap_info *select_rlc_lte_session(capture_file *cf,
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
rel_ts = edt.pi.rel_ts;
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);

View File

@ -20,7 +20,6 @@
#include <glib.h>
#include <math.h>
#include "globals.h"
#include <string.h>
#include <epan/rtp_pt.h>

View File

@ -319,7 +319,9 @@ select_tcpip_session(capture_file *cf, struct segment *hdrs)
epan_dissect_init(&edt, cf->epan, TRUE, FALSE);
epan_dissect_prime_with_dfilter(&edt, sfcode);
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr, frame_tvbuff_new_buffer(fdata, &cf->buf), fdata, NULL);
epan_dissect_run_with_taps(&edt, cf->cd_t, &cf->phdr,
frame_tvbuff_new_buffer(&cf->provider, fdata, &cf->buf),
fdata, NULL);
rel_ts = edt.pi.rel_ts;
epan_dissect_cleanup(&edt);
remove_tap_listener(&th);

View File

@ -22,8 +22,6 @@
#include "config.h"
#include "globals.h"
#include "wiretap/pcap-encap.h"
#include "wsutil/os_version_info.h"
#include "version_info.h"

View File

@ -19,7 +19,7 @@
#include <richedit.h>
#include <strsafe.h>
#include "file.h"
#include "globals.h"
#include "wsutil/file_util.h"
#include "wsutil/str_util.h"