#include <epan/packet.h>
#include <epan/prefs.h>
-#include "globals.h"
#include "file.h"
#include "ui/capture.h"
#include <glib.h>
+#include <epan/tvbuff.h>
+#include <epan/packet_info.h>
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define __TAP_H__
#include <epan/epan.h>
+#include <epan/packet_info.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus
}
/* 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) {
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);
}
{
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;
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))
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);
/* 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. */
/* 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. */
{
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);
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,
/* 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;
/* 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++) {
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;
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);
#include <wsutil/file_util.h>
#include <wsutil/filesystem.h>
-#include "globals.h"
#include <epan/strutil.h>
#include <epan/tvbuff.h>
#include "frame_tvbuff.h"
-#include "globals.h"
#include "wiretap/wtap-int.h" /* for ->random_fh */
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;
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:
/* 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;
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;
}
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 *
struct tvb_frame *cloned_frame_tvb;
/* file not seekable */
- if (!frame_tvb->wth)
+ if (!frame_tvb->prov)
return NULL;
abs_offset += frame_tvb->offset;
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;
/* 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;
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;
}
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));
}
/*
#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 frame_data *fd, const guint8 *buf);
+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_buffer(const frame_data *fd, Buffer *buf);
+extern tvbuff_t *frame_tvbuff_new_buffer(const struct packet_provider_data *prov,
+ const frame_data *fd, Buffer *buf);
-extern tvbuff_t *file_tvbuff_new(const frame_data *fd, const guint8 *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_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
}
/* 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;
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)
* 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 */
* 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 */
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);
}
/* 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));
#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);
#include <wsutil/glib-compat.h>
#include <wsutil/strtoi.h>
+#include "globals.h"
+
#include "sharkd.h"
static gboolean
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)
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)
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)
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)
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)
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)
#include "ui/gtk/main.h"
#include "ui/gtk/addr_resolution_dlg.h"
+#include "globals.h"
+
static GtkWidget *addr_resolution_dlg_w = NULL;
#include "ui/gtk/extcap_gtk.h"
#endif
+#include "globals.h"
+
/*
* Symbolic names for column indices.
*/
#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
#include <epan/addr_resolv.h>
-
#include <epan/stat_groups.h>
#include "ui/simple_dialog.h"
#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"
#include <epan/tap.h>
#include <epan/dissectors/packet-dcerpc.h>
-
#include "ui/simple_dialog.h"
#include "ui/gtk/gui_stat_menu.h"
#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 */
#include "ui/gtk/packet_win.h"
#include "ui/gtk/stock_icons.h"
+#include "globals.h"
+
#undef DEBUG
/**************************************************/
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
enum { DND_TARGET_STRING, DND_TARGET_ROOTWIN, DND_TARGET_URL };
#include <gtk/gtk.h>
-
#include "ui/main_statusbar.h"
#include "ui/gtk/dlg_utils.h"
#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;
#include "ui/gtk/edit_packet_comment_dlg.h"
#include "ui/gtk/gtkglobals.h"
+#include "globals.h"
+
void register_tap_listener_expert_comp(void);
enum
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
const char *packet = "Packet:";
enum
#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"
#include <gtk/gtk.h>
-#include "globals.h"
#include <wiretap/pcap-encap.h>
#include <epan/exported_pdu.h>
#include "config.h"
#include <string.h>
+#include <errno.h>
#include <wsutil/file_util.h>
#include <wsutil/str_util.h>
#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
#include "ui/gtk/filter_autocomplete.h"
#include "ui/gtk/help_dlg.h"
+#include "globals.h"
#include "main.h"
#ifndef __FILTER_EXPRESSIONS_SAVE_DLG_H__
#define __FILTER_EXPRESSIONS_SAVE_DLG_H__
-#include "globals.h"
#include "epan/filter_expressions.h"
enum {
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
void
apply_selected_filter (guint callback_action, const char *filter)
{
#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 */
#include "config.h"
#include <string.h>
-
#include <epan/packet.h>
#include <epan/stat_tap_ui.h>
#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;
#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
*/
#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 {
#include "ui/gtk/old-gtk-compat.h"
#include "ui/gtk/stock_icons.h"
+#include "globals.h"
+
/****************************************************************************/
#define MAX_LABEL 50
#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
#include "frame_tvbuff.h"
+#include "globals.h"
+
void register_tap_listener_iax2_analysis(void);
enum
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)) {
#include "ui/gtk/filter_autocomplete.h"
#include "ui/main_statusbar.h"
+#include "globals.h"
void register_tap_listener_gtk_iostat(void);
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
void register_tap_listener_mac_lte_stat(void);
/**********************************************/
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 */
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);
#ifndef __MAIN_H__
#define __MAIN_H__
-#include "globals.h"
+#include "cfile.h"
#include "capture_opts.h"
/** @defgroup main_window_group Main window
#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"
#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.
*/
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
static gboolean toolbar_init = FALSE;
#ifdef HAVE_LIBPCAP
#include "config.h"
+#include <errno.h>
#include <gtk/gtk.h>
#include "airpcap_gui_utils.h"
#endif
+#include "file.h"
+
/* XXX */
static GtkWidget *welcome_hb = NULL;
static GtkWidget *header_lb = NULL;
#include "ui/gtk/packet_win.h"
#include "simple_dialog.h"
+#include "globals.h"
+
GtkWidget *man_addr_resolv_dlg = NULL;
static void
#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;
#include <wsutil/str_util.h>
+#include "globals.h"
+
#define COLUMN_WIDTH_MIN 40
#define MAX_COMMENTS_TO_FETCH 20000000 /* Arbitrary */
* 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 */
#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"
#include "frame_tvbuff.h"
+#include "globals.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), 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);
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);
#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);
#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_);
#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"
#include "config.h"
+#include <errno.h>
+
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#if GTK_CHECK_VERSION(3,0,0)
# 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"
#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);
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
enum
{
TYPE_COLUMN,
#include "ui/recent.h"
+#include "globals.h"
void register_tap_listener_rlc_lte_stat(void);
#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 */
#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"
#include "frame_tvbuff.h"
+#include "globals.h"
+
void register_tap_listener_rtp_analysis(void);
enum
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
#include "frame_tvbuff.h"
+#include "globals.h"
+
static sctp_assoc_info_t static_assoc;
void
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)) {
#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
#include <string.h>
-
#include <epan/to_str.h>
#include <epan/value_string.h>
#include <epan/tap.h>
#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);
#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 */
#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;
#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
#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;
#include "epan/conversation.h"
#include "epan/dissectors/packet-scsi.h"
+#include "globals.h"
+
#define NANOSECS_PER_SEC 1000000000
enum
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
typedef struct _gtk_simplestat_t {
GtkWidget *vbox;
GtkWidget *win;
#include "ui/win32/file_dlg_win32.h"
#endif
+#include "globals.h"
+
void register_tap_listener_stats_tree_stat(void);
struct _st_node_pres {
#include <gtk/gtk.h>
-
-
#include <version_info.h>
#include "../../file.h"
#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
#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";
#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
#include "ui/gtk/old-gtk-compat.h"
+#include "globals.h"
+
void register_tap_listener_wlanstat(void);
enum {
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);
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 */
#include "export_pdu_dialog.h"
#include <ui_export_pdu_dialog.h>
-#include "globals.h"
#include <wiretap/pcap-encap.h>
#include <epan/tap.h>
#include <glib.h>
-#include "globals.h"
#include "summary.h"
#include <epan/packet.h>
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)) {
#include "wireshark_application.h"
#include "simple_dialog.h"
-#include "globals.h"
-
#include <epan/dissectors/packet-rlc-lte.h>
#include <ui/tap-rlc-graph.h>
* 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 */
#include <glib.h>
-#include "globals.h"
#include "summary.h"
#include <epan/tap.h>
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);
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) ||
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
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);
}
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);
#include <glib.h>
#include <math.h>
-#include "globals.h"
#include <string.h>
#include <epan/rtp_pt.h>
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);
#include "config.h"
-
-#include "globals.h"
#include "wiretap/pcap-encap.h"
#include "wsutil/os_version_info.h"
#include "version_info.h"
#include <richedit.h>
#include <strsafe.h>
-#include "file.h"
+#include "globals.h"
#include "wsutil/file_util.h"
#include "wsutil/str_util.h"