Use cfile.h to define the capture_file type.

Have cfile-int.h declare the structure, and use it in files that
directly access the structure.

Have cfile.h just incompletely declare the structure and include it
rather than explicitly declaring it in source files or other header
files.

Never directly refer to struct _capture_file except when typedeffing
capture_file.

Add #includes as necessary, now that cfile.h doesn't drag in a ton of

Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556
Reviewed-on: https://code.wireshark.org/review/24686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-12-03 10:53:58 -08:00
parent 114c989fb3
commit eb8ffb74e2
72 changed files with 141 additions and 120 deletions

View File

@ -44,7 +44,7 @@ typedef enum {
CAPTURE_RUNNING /**< capture child signalled ok, capture is running now */
} capture_state;
struct _capture_file;
#include "cfile.h"
struct _info_data;
/*
* State of a capture session.
@ -63,12 +63,12 @@ typedef struct _capture_session {
gboolean session_started;
guint32 count; /**< Total number of frames captured */
capture_options *capture_opts; /**< options for this capture */
struct _capture_file *cf; /**< handle to cfile */
capture_file *cf; /**< handle to cfile */
struct _info_data *cap_data_info; /**< stats for this capture */
} capture_session;
extern void
capture_session_init(capture_session *cap_session, struct _capture_file *cf);
capture_session_init(capture_session *cap_session, capture_file *cf);
#else
/* dummy is needed because clang throws the error: empty struct has size 0 in C, size 1 in C++ */

View File

@ -122,7 +122,7 @@ static void (*fetch_dumpcap_pid)(ws_process_id) = NULL;
void
capture_session_init(capture_session *cap_session, struct _capture_file *cf)
capture_session_init(capture_session *cap_session, capture_file *cf)
{
cap_session->cf = cf;
cap_session->fork_child = WS_INVALID_PID; /* invalid process handle */

View File

@ -17,9 +17,10 @@
#include <wiretap/pcapng.h>
#include "cfile.h"
#include "cfile-int.h"
const char *
cap_file_get_interface_name(struct _capture_file *cf, guint32 interface_id)
cap_file_get_interface_name(capture_file *cf, guint32 interface_id)
{
wtapng_iface_descriptions_t *idb_info;
wtap_block_t wtapng_if_descr = NULL;
@ -42,7 +43,7 @@ cap_file_get_interface_name(struct _capture_file *cf, guint32 interface_id)
}
const char *
cap_file_get_interface_description(struct _capture_file *cf, guint32 interface_id)
cap_file_get_interface_description(capture_file *cf, guint32 interface_id)
{
wtapng_iface_descriptions_t *idb_info;
wtap_block_t wtapng_if_descr = NULL;

79
cfile.h
View File

@ -11,12 +11,7 @@
#ifndef __CFILE_H__
#define __CFILE_H__
#include <epan/epan.h>
#include <epan/column-info.h>
#include <epan/dfilter/dfilter.h>
#include <epan/frame_data.h>
#include <epan/frame_data_sequence.h>
#include <wiretap/wtap.h>
#include <glib.h>
#ifdef __cplusplus
extern "C" {
@ -43,77 +38,13 @@ typedef enum {
SD_BACKWARD
} search_direction;
typedef struct _capture_file {
epan_t *epan;
file_state state; /* Current state of capture file */
gchar *filename; /* Name of capture file */
gchar *source; /* Temp file source, e.g. "Pipe from elsewhere" */
gboolean is_tempfile; /* Is capture file a temporary file? */
gboolean unsaved_changes; /* Does the capture file have changes that have not been saved? */
gboolean stop_flag; /* Stop current processing (loading, searching, etc.) */
gint64 f_datalen; /* Size of capture file data (uncompressed) */
guint16 cd_t; /* File type of capture file */
unsigned int open_type; /* open_routine index+1 used, if selected, or WTAP_TYPE_AUTO */
gboolean iscompressed; /* TRUE if the file is compressed */
int lnk_t; /* File link-layer type; could be WTAP_ENCAP_PER_PACKET */
GArray *linktypes; /* Array of packet link-layer types */
guint32 count; /* Total number of frames */
guint64 packet_comment_count; /* Number of comments in frames (could be >1 per frame... */
guint32 displayed_count; /* Number of displayed frames */
guint32 marked_count; /* Number of marked frames */
guint32 ignored_count; /* Number of ignored frames */
guint32 ref_time_count; /* Number of time referenced frames */
gboolean drops_known; /* TRUE if we know how many packets were dropped */
guint32 drops; /* Dropped packets */
nstime_t elapsed_time; /* Elapsed time */
int snap; /* Maximum captured packet length; 0 if unknown */
wtap *wth; /* Wiretap session */
dfilter_t *rfcode; /* Compiled read filter program */
dfilter_t *dfcode; /* Compiled display filter program */
gchar *dfilter; /* Display filter string */
gboolean redissecting; /* TRUE if currently redissecting (cf_redissect_packets) */
/* search */
gchar *sfilter; /* Filter, hex value, or string being searched */
gboolean hex; /* TRUE if "Hex value" search was last selected */
gboolean string; /* TRUE if "String" search was last selected */
gboolean summary_data; /* TRUE if "String" search in "Packet list" (Info column) was last selected */
gboolean decode_data; /* TRUE if "String" search in "Packet details" was last selected */
gboolean packet_data; /* TRUE if "String" search in "Packet data" was last selected */
guint32 search_pos; /* Byte position of last byte found in a hex search */
guint32 search_len; /* Length of bytes matching the search */
gboolean case_type; /* TRUE if case-insensitive text search */
GRegex *regex; /* Set if regular expression search */
search_charset_t scs_type; /* Character set for text search */
search_direction dir; /* Direction in which to do searches */
gboolean search_in_progress; /* TRUE if user just clicked OK in the Find dialog or hit <control>N/B */
/* packet data */
struct wtap_pkthdr phdr; /* Packet header */
Buffer buf; /* Packet data */
/* frames */
frame_data_sequence *frames; /* Sequence of frames, if we're keeping that information */
guint32 first_displayed; /* Frame number of first frame displayed */
guint32 last_displayed; /* Frame number of last frame displayed */
column_info cinfo; /* Column formatting information */
gboolean columns_changed; /**< Have the columns been changed in the prefs? (GTK+ only) */
frame_data *current_frame; /* Frame data for current frame */
gint current_row; /* Row number for current frame */
epan_dissect_t *edt; /* Protocol dissection for currently selected packet */
field_info *finfo_selected; /* Field info for currently selected field */
gpointer window; /* Top-level window associated with file */
GTree *frames_user_comments; /* BST with user comments for frames (key = frame_data) */
gulong computed_elapsed; /* Elapsed time to load the file (in msec). */
guint32 cum_bytes;
const frame_data *ref;
frame_data *prev_dis;
frame_data *prev_cap;
} capture_file;
struct _capture_file;
typedef struct _capture_file capture_file;
extern void cap_file_init(capture_file *cf);
extern const char *cap_file_get_interface_name(struct _capture_file *cf, guint32 interface_id);
extern const char *cap_file_get_interface_description(struct _capture_file *cf, guint32 interface_id);
extern const char *cap_file_get_interface_name(capture_file *cf, guint32 interface_id);
extern const char *cap_file_get_interface_description(capture_file *cf, guint32 interface_id);
#ifdef __cplusplus
}

View File

@ -25,15 +25,23 @@
#include <epan/frame_data.h>
#include <wsutil/nstime.h>
struct _capture_file;
/*
* XXX - this isn't part of libwireshark; using it in the API indicates
* that perhaps it should be, in some fashion.
*
* Whether the structure definition of a capture_file should be part
* of libwireshark, or part of the code that uses libwireshark, is
* another matter.
*/
#include "cfile.h"
struct epan_session {
struct _capture_file *cf;
capture_file *cf;
const nstime_t *(*get_frame_ts)(struct _capture_file *cf, guint32 frame_num);
const char *(*get_interface_name)(struct _capture_file *cf, guint32 interface_id);
const char *(*get_interface_description)(struct _capture_file *cf, guint32 interface_id);
const char *(*get_user_comment)(struct _capture_file *cf, const frame_data *fd);
const nstime_t *(*get_frame_ts)(capture_file *cf, guint32 frame_num);
const char *(*get_interface_name)(capture_file *cf, guint32 interface_id);
const char *(*get_interface_description)(capture_file *cf, guint32 interface_id);
const char *(*get_user_comment)(capture_file *cf, const frame_data *fd);
};
#endif

View File

@ -31,9 +31,10 @@ extern "C" {
#include <ws_symbol_export.h>
#include <wsutil/nstime.h>
#include <wiretap/wtap.h>
struct _packet_info;
struct epan_session;
struct wtap_pkthdr;
#define PINFO_FD_VISITED(pinfo) ((pinfo)->fd->flags.visited)

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

5
file.c
View File

@ -44,6 +44,7 @@
#include <epan/color_filters.h>
#include "cfile.h"
#include "cfile-int.h"
#include "file.h"
#include "fileset.h"
#include "frame_tvbuff.h"
@ -225,7 +226,7 @@ static void compute_elapsed(capture_file *cf, GTimeVal *start_time)
}
static const nstime_t *
ws_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
ws_get_frame_ts(capture_file *cf, guint32 frame_num)
{
if (cf->prev_dis && cf->prev_dis->num == frame_num)
return &cf->prev_dis->abs_ts;
@ -243,7 +244,7 @@ ws_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
}
static const char *
ws_get_user_comment(struct _capture_file *cf, const frame_data *fd)
ws_get_user_comment(capture_file *cf, const frame_data *fd)
{
return cf_get_user_packet_comment(cf, fd);
}

5
file.h
View File

@ -11,10 +11,11 @@
#ifndef __FILE_H__
#define __FILE_H__
#include "wiretap/wtap.h"
#include <errno.h>
#include <epan/epan.h>
#include <wiretap/wtap.h>
#include <epan/epan.h>
#include <epan/dfilter/dfilter.h>
#include <epan/print.h>
#include <ui/packet_range.h>

View File

@ -12,6 +12,7 @@
#define __GLOBALS_H__
#include "file.h"
#include "cfile-int.h"
#include <epan/timestamp.h>
#ifdef __cplusplus

View File

@ -1466,7 +1466,7 @@ open_failure_message(const char *filename, int err, gboolean for_writing)
}
static const nstime_t *
raw_get_frame_ts(struct _capture_file *cf _U_, guint32 frame_num)
raw_get_frame_ts(capture_file *cf _U_, guint32 frame_num)
{
if (ref && ref->num == frame_num)
return &ref->abs_ts;

View File

@ -224,7 +224,7 @@ clean_exit:
}
static const nstime_t *
sharkd_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
sharkd_get_frame_ts(capture_file *cf, guint32 frame_num)
{
if (ref && ref->num == frame_num)
return &ref->abs_ts;

View File

@ -16,6 +16,7 @@
#include <epan/packet.h>
#include "cfile.h"
#include "cfile-int.h"
#include "summary.h"
static void

View File

@ -1026,7 +1026,7 @@ clean_exit:
}
static const nstime_t *
tfshark_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
tfshark_get_frame_ts(capture_file *cf, guint32 frame_num)
{
if (ref && ref->num == frame_num)
return &ref->abs_ts;
@ -1047,7 +1047,7 @@ tfshark_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
}
static const char *
no_interface_name(struct _capture_file *cf _U_, guint32 interface_id _U_)
no_interface_name(capture_file *cf _U_, guint32 interface_id _U_)
{
return "";
}

View File

@ -111,7 +111,7 @@ failure_message_cont(const char *msg_format, va_list ap)
}
static const nstime_t *
fuzzshark_get_frame_ts(struct _capture_file *cf _U_, guint32 frame_num _U_)
fuzzshark_get_frame_ts(capture_file *cf _U_, guint32 frame_num _U_)
{
static nstime_t empty;

View File

@ -2346,7 +2346,7 @@ pipe_input_set_handler(gint source, gpointer user_data, ws_process_id *child_pro
}
static const nstime_t *
tshark_get_frame_ts(struct _capture_file *cf, guint32 frame_num)
tshark_get_frame_ts(capture_file *cf, guint32 frame_num)
{
if (ref && ref->num == frame_num)
return &ref->abs_ts;

View File

@ -21,6 +21,8 @@
#include <epan/packet.h>
#include <epan/dfilter/dfilter.h>
#include "file.h"
#include "cfile.h"
#include "cfile-int.h"
#include "ui/capture.h"
#include "caputils/capture_ifinfo.h"
#include <capchild/capture_sync.h>

View File

@ -40,6 +40,7 @@
#include "ui/alert_box.h"
#include "ui/simple_dialog.h"
#include "tap_export_pdu.h"
#include "cfile-int.h"
#include "export_pdu_ui_utils.h"
static void

View File

@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include "file.h"
#include "cfile-int.h"
#include "gtkglobals.h"
#include "gui_utils.h"

View File

@ -24,10 +24,10 @@
#include "config.h"
#include "packet_list_utils.h"
#include <epan/column.h>
#include "cfile-int.h"
gboolean
right_justify_column (gint col, capture_file *cf)

View File

@ -33,6 +33,8 @@
#include "packet_range.h"
#include "cfile-int.h"
/* (re-)calculate the packet counts (except the user specified range) */
static void packet_range_calc(packet_range_t *range) {
guint32 framenum;

View File

@ -33,6 +33,7 @@ extern "C" {
#include <glib.h>
#include <epan/range.h>
#include <epan/frame_data.h>
#include "cfile.h"

View File

@ -10,14 +10,15 @@
#include "config.h"
#include <string.h>
#include "file.h"
#include "frame_tvbuff.h"
#include "ui/proto_hier_stats.h"
#include "ui/progress_dlg.h"
#include "epan/epan_dissect.h"
#include "epan/proto.h"
#include <string.h>
#include "cfile-int.h"
/* Update the progress bar this many times when scanning the packet list. */
#define N_PROGBAR_UPDATES 100

View File

@ -19,6 +19,7 @@ extern "C" {
*/
#include <epan/proto.h>
#include "cfile.h"
typedef struct {
header_field_info *hfinfo;
@ -37,8 +38,7 @@ typedef struct {
double last_time; /* seconds (msec resolution) of last packet */
} ph_stats_t;
struct _capture_file;
ph_stats_t *ph_stats_new(struct _capture_file *cf);
ph_stats_t *ph_stats_new(capture_file *cf);
void ph_stats_free(ph_stats_t *ps);

View File

@ -30,6 +30,8 @@
#include "epan/epan_dissect.h"
#include "epan/frame_data.h"
#include "cfile-int.h"
#include "address_editor_frame.h"
#include <ui_address_editor_frame.h>

View File

@ -28,6 +28,7 @@
#include <QTreeWidgetItem>
#include "cfile.h"
#include "cfile-int.h"
#include "epan/epan_dissect.h"
#include "epan/tvbuff-int.h"

View File

@ -28,7 +28,8 @@
#include <glib.h>
typedef struct _capture_file capture_file;
#include "cfile.h"
typedef struct _capture_session capture_session;
struct _packet_info;

View File

@ -32,6 +32,7 @@
#include <errno.h>
#include "file.h"
#include "cfile-int.h"
#include "wsutil/filesystem.h"
#include "wsutil/nstime.h"
#include "wsutil/str_util.h"

View File

@ -33,6 +33,8 @@
#include <ui/qt/utils/qt_ui_utils.h>
#include "wireshark_application.h"
#include "cfile-int.h"
#include <QPushButton>
#include <QScrollBar>
#include <QTextStream>

View File

@ -24,6 +24,8 @@
#include <epan/prefs.h>
#include <epan/dissectors/packet-tcp.h>
#include "cfile-int.h"
#include "ui/recent.h"
#include "ui/tap-tcp-stream.h"
#include "ui/traffic_table_ui.h"

View File

@ -29,6 +29,8 @@
#include <epan/prefs.h>
#include "cfile-int.h"
#include "ui/recent.h"
#include "ui/traffic_table_ui.h"

View File

@ -23,6 +23,7 @@
#include <ui_expert_info_dialog.h>
#include "file.h"
#include "cfile-int.h"
#include <epan/epan_dissect.h>
#include <epan/expert.h>

View File

@ -25,6 +25,7 @@
#include "file.h"
#include "fileset.h"
#include "cfile-int.h"
#include "ui/help_url.h"

View File

@ -34,6 +34,8 @@
#include "epan/epan_dissect.h"
#include "epan/tap.h"
#include "cfile-int.h"
#include "ui/alert_box.h"
#include "ui/simple_dialog.h"
#include <wsutil/utf8_entities.h>

View File

@ -23,6 +23,7 @@
#include <ui_iax2_analysis_dialog.h>
#include "file.h"
#include "cfile-int.h"
#include "frame_tvbuff.h"
#include <epan/epan_dissect.h>

View File

@ -23,6 +23,7 @@
#include <ui_io_graph_dialog.h>
#include "file.h"
#include "cfile-int.h"
#include <epan/stat_tap_ui.h>
#include "epan/stats_tree_priv.h"

View File

@ -29,6 +29,7 @@
#include <glib.h>
#include "cfile.h"
#include <epan/epan.h>
#include <epan/packet_info.h>
#include <QDialog>

View File

@ -29,6 +29,7 @@
#include <glib.h>
#include "cfile.h"
#include <epan/epan.h>
#include <epan/packet_info.h>
#include <QDialog>

View File

@ -29,6 +29,7 @@
#include <glib.h>
#include "cfile.h"
#include <epan/epan.h>
#include <epan/packet_info.h>
#include <QDialog>

View File

@ -35,13 +35,14 @@
#include "ui/profile.h"
#include <ui/qt/utils/qt_ui_utils.h>
#include "capture_file.h"
#include "main_status_bar.h"
#include "profile_dialog.h"
#include <ui/qt/utils/stock_icon.h>
#include <ui/qt/utils/tango_colors.h>
#include "cfile-int.h"
#include <QAction>
#include <QHBoxLayout>
#include <QSplitter>

View File

@ -39,6 +39,8 @@ DIAG_ON(frame-larger-than=)
#include <epan/plugin_if.h>
#include <epan/export_object.h>
#include "cfile-int.h"
#include "ui/iface_toolbar.h"
#ifdef HAVE_LIBPCAP

View File

@ -71,6 +71,8 @@ DIAG_ON(frame-larger-than=)
#include <epan/wslua/init_wslua.h>
#endif
#include "cfile-int.h"
#include "ui/alert_box.h"
#ifdef HAVE_LIBPCAP
#include "ui/capture_ui_utils.h"

View File

@ -25,6 +25,8 @@
#include "epan/decode_as.h"
#include "epan/epan_dissect.h"
#include "cfile-int.h"
#include <ui/qt/utils/variant_pointer.h>
#include <QComboBox>

View File

@ -29,6 +29,8 @@
#include <epan/prefs-int.h>
#include <epan/dissectors/packet-dcerpc.h>
#include "cfile-int.h"
#include <ui/qt/utils/qt_ui_utils.h>
static const char *DEFAULT_TABLE = "tcp.port"; // Arbitrary

View File

@ -24,6 +24,7 @@
#include "packet_list_model.h"
#include "file.h"
#include "cfile-int.h"
#include <wsutil/nstime.h>
#include <epan/column.h>

View File

@ -22,6 +22,7 @@
#include "packet_list_record.h"
#include <file.h>
#include <cfile-int.h>
#include <epan/epan_dissect.h>
#include <epan/column-info.h>

View File

@ -35,6 +35,8 @@
#include "proto_tree.h"
#include "wireshark_application.h"
#include "cfile-int.h"
#include <ui/qt/utils/field_information.h>
#include <QTreeWidgetItemIterator>

View File

@ -26,6 +26,7 @@
#include <glib.h>
#include "file.h"
#include "cfile-int.h"
#include <epan/epan.h>
#include <epan/epan_dissect.h>

View File

@ -21,6 +21,7 @@
#include "packet_range_group_box.h"
#include <ui_packet_range_group_box.h>
#include "cfile-int.h"
PacketRangeGroupBox::PacketRangeGroupBox(QWidget *parent) :
QGroupBox(parent),

View File

@ -22,6 +22,8 @@
#include "print_dialog.h"
#include <ui_print_dialog.h>
#include "cfile-int.h"
#include <wsutil/utf8_entities.h>
#include <QPrintDialog>

View File

@ -26,6 +26,8 @@
#include <epan/ftypes/ftypes.h>
#include <epan/prefs.h>
#include "cfile-int.h"
#include <ui/qt/utils/color_utils.h>
#include <ui/qt/utils/variant_pointer.h>
#include <ui/qt/utils/wireshark_mime_data.h>

View File

@ -23,6 +23,7 @@
#include <ui_protocol_hierarchy_dialog.h>
#include "cfile.h"
#include "cfile-int.h"
#include "ui/proto_hier_stats.h"

View File

@ -27,6 +27,7 @@
#include <glib.h>
#include "file.h"
#include "cfile-int.h"
#include "epan/addr_resolv.h"
#include <wiretap/wtap.h>

View File

@ -23,6 +23,7 @@
#include <ui_rtp_analysis_dialog.h>
#include "file.h"
#include "cfile-int.h"
#include "frame_tvbuff.h"
#include "epan/epan_dissect.h"

View File

@ -27,6 +27,7 @@
#include <glib.h>
#include "epan/address.h"
#include "epan/proto.h"
#include "ui/rtp_stream.h"
#include "ui/tap-rtp-analysis.h"

View File

@ -30,6 +30,8 @@
#include "sctp_graph_byte_dialog.h"
#include "sctp_chunk_statistics_dialog.h"
#include "cfile-int.h"
SCTPAssocAnalyseDialog::SCTPAssocAnalyseDialog(QWidget *parent, sctp_assoc_info_t *assoc, capture_file *cf, SCTPAllAssocsDialog* caller) :
QDialog(parent),
ui(new Ui::SCTPAssocAnalyseDialog),

View File

@ -25,6 +25,8 @@
#include <config.h>
#include <glib.h>
#include "cfile.h"
#include <QDialog>
namespace Ui {
@ -33,7 +35,6 @@ class SCTPGraphArwndDialog;
class QCPAbstractPlottable;
struct _capture_file;
struct _sctp_assoc_info;
class SCTPGraphArwndDialog : public QDialog
@ -41,11 +42,11 @@ class SCTPGraphArwndDialog : public QDialog
Q_OBJECT
public:
explicit SCTPGraphArwndDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphArwndDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, capture_file *cf = NULL, int dir = 0);
~SCTPGraphArwndDialog();
public slots:
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_4_clicked();
@ -57,7 +58,7 @@ private slots:
private:
Ui::SCTPGraphArwndDialog *ui;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
capture_file *cap_file_;
int frame_num;
int direction;
int startArwnd;

View File

@ -25,6 +25,8 @@
#include <config.h>
#include <glib.h>
#include "cfile.h"
#include <QDialog>
namespace Ui {
@ -33,7 +35,6 @@ class SCTPGraphByteDialog;
class QCPAbstractPlottable;
struct _capture_file;
struct _sctp_assoc_info;
class SCTPGraphByteDialog : public QDialog
@ -41,11 +42,11 @@ class SCTPGraphByteDialog : public QDialog
Q_OBJECT
public:
explicit SCTPGraphByteDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphByteDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, capture_file *cf = NULL, int dir = 0);
~SCTPGraphByteDialog();
public slots:
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_4_clicked();
@ -57,7 +58,7 @@ private slots:
private:
Ui::SCTPGraphByteDialog *ui;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
capture_file *cap_file_;
int frame_num;
int direction;
QVector<double> xb, yb;

View File

@ -25,6 +25,8 @@
#include <config.h>
#include <glib.h>
#include "cfile.h"
#include <QDialog>
namespace Ui {
@ -34,7 +36,6 @@ class SCTPGraphDialog;
class QCPAbstractPlottable;
class QCustomPlot;
struct _capture_file;
struct _sctp_assoc_info;
struct chunk_header {
@ -88,12 +89,12 @@ class SCTPGraphDialog : public QDialog
Q_OBJECT
public:
explicit SCTPGraphDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, struct _capture_file *cf = NULL, int dir = 0);
explicit SCTPGraphDialog(QWidget *parent = 0, struct _sctp_assoc_info *assoc = NULL, capture_file *cf = NULL, int dir = 0);
~SCTPGraphDialog();
static void save_graph(QDialog *dlg, QCustomPlot *plot);
public slots:
void setCaptureFile(struct _capture_file *cf) { cap_file_ = cf; }
void setCaptureFile(capture_file *cf) { cap_file_ = cf; }
private slots:
void on_pushButton_clicked();
@ -111,7 +112,7 @@ private slots:
private:
Ui::SCTPGraphDialog *ui;
struct _sctp_assoc_info *selected_assoc;
struct _capture_file *cap_file_;
capture_file *cap_file_;
int frame_num;
int direction;
QVector<double> xt, yt, xs, ys, xg, yg, xd, yd, xn, yn;

View File

@ -23,6 +23,7 @@
#include <ui_search_frame.h>
#include "file.h"
#include "cfile-int.h"
#include <epan/proto.h>
#include <epan/strutil.h>

View File

@ -25,6 +25,8 @@
#include "epan/addr_resolv.h"
#include "file.h"
#include "cfile-int.h"
#include "wsutil/nstime.h"
#include "wsutil/utf8_entities.h"
#include "wsutil/file_util.h"

View File

@ -26,6 +26,9 @@
#include "wireshark_application.h"
#include "epan/charsets.h"
#include "cfile-int.h"
#include "wsutil/base64.h"
#include "wsutil/utf8_entities.h"

View File

@ -24,6 +24,8 @@
#include "wireshark_application.h"
#include "cfile-int.h"
#include <ui/time_shift.h>
#include <ui/qt/utils/tango_colors.h>

View File

@ -26,6 +26,8 @@
#include <epan/addr_resolv.h>
#include <epan/prefs.h>
#include "cfile-int.h"
#include "ui/recent.h"
#include "progress_frame.h"

View File

@ -27,6 +27,7 @@
#include "wiretap/wtap.h"
#include "cfile.h"
#include "cfile-int.h"
#include "file.h"
#include <ui/qt/capture_file.h>

View File

@ -23,6 +23,7 @@
#include <ui_voip_calls_dialog.h>
#include "file.h"
#include "cfile-int.h"
#include "epan/addr_resolv.h"
#include "epan/dissectors/packet-h225.h"

View File

@ -26,6 +26,8 @@
#include <glib.h>
#include "cfile.h"
#include "ui/voip_calls.h"
#include <ui/qt/models/voip_calls_info_model.h>
@ -34,8 +36,6 @@
#include <QMenu>
struct _capture_file;
class QAbstractButton;
class SequenceInfo;
@ -57,7 +57,7 @@ public slots:
signals:
void updateFilter(QString filter, bool force = false);
void captureFileChanged(struct _capture_file *cf);
void captureFileChanged(capture_file *cf);
void goToPacket(int packet_num);
protected:

View File

@ -37,6 +37,8 @@
#include <epan/packet.h>
#include <epan/tap.h>
#include "cfile-int.h"
/* Return TRUE if the 2 sets of parameters refer to the same channel. */
int compare_rlc_headers(guint16 ueid1, guint16 channelType1, guint16 channelId1, guint8 rlcMode1, guint8 direction1,
guint16 ueid2, guint16 channelType2, guint16 channelId2, guint8 rlcMode2, guint8 direction2,

View File

@ -38,6 +38,8 @@
#include "ui/simple_dialog.h"
#include "cfile-int.h"
#include "tap-tcp-stream.h"
typedef struct _tcp_scan_t {

View File

@ -27,11 +27,12 @@
#include <string.h>
#include <math.h>
#include "time_shift.h"
#include "ui/ws_ui_util.h"
#include "cfile-int.h"
#ifndef HAVE_FLOORL
#define floorl(x) floor((double)x)
#endif

View File

@ -37,6 +37,7 @@
#include <string.h>
#include "epan/epan_dissect.h"
#include "epan/column-info.h"
#include "epan/packet.h"
#include "epan/proto_data.h"
#include "epan/to_str.h"

View File

@ -63,6 +63,7 @@
/* general (not Qt specific) */
#include "file.h"
#include "cfile-int.h"
#include "epan/color_filters.h"
#include "log.h"