aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-07 19:31:43 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-08 03:32:25 +0000
commit797d2f6a87607b146a2ef62e1ff501031dce8212 (patch)
tree7c18adbd5b86d5f2843dd760f6fa492f7c05fef4 /ui/gtk
parent0baa4458c5780b143ad4479d387202ddf4add06f (diff)
Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a "packet provider" structure; that structure is opaque within libwireshark, and a pointer to it is passed to the callbacks that provide interface names, interface, descriptions, user comments, and packet time stamps, and that set user comments. The code that calls epan_new() is expected to provide those callbacks, and to define the structure, which can be used by the providers. If none of the callbacks need that extra information, the "packet provider" structure can be null. Have a "file" packet provider for all the programs that provide packets from a file. Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0 Reviewed-on: https://code.wireshark.org/review/24731 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/packet_list.c14
-rw-r--r--ui/gtk/packet_win.c2
-rw-r--r--ui/gtk/summary_dlg.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/ui/gtk/packet_list.c b/ui/gtk/packet_list.c
index 09c32525c4..5504c7db07 100644
--- a/ui/gtk/packet_list.c
+++ b/ui/gtk/packet_list.c
@@ -1344,7 +1344,7 @@ mark_all_displayed_frames(gboolean set)
guint32 framenum;
frame_data *fdata;
for (framenum = 1; framenum <= cfile.count; framenum++) {
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
if( fdata->flags.passed_dfilter )
set_frame_mark(set, fdata);
}
@@ -1371,7 +1371,7 @@ toggle_mark_all_displayed_frames(void)
guint32 framenum;
frame_data *fdata;
for (framenum = 1; framenum <= cfile.count; framenum++) {
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
if( fdata->flags.passed_dfilter )
set_frame_mark(!fdata->flags.marked, fdata);
}
@@ -1420,7 +1420,7 @@ ignore_all_displayed_frames(gboolean set)
/* XXX: we might need a progressbar here */
for (framenum = 1; framenum <= cfile.count; framenum++) {
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
if( fdata->flags.passed_dfilter )
set_frame_ignore(set, fdata);
}
@@ -1435,7 +1435,7 @@ packet_list_ignore_all_displayed_frames_cb(GtkWidget *w _U_, gpointer data _U_)
/* Due to performance impact with large captures, don't check the filtered list for
an ignored frame; just check the first. If a ignored frame exists but isn't first and
the user wants to unignore all the displayed frames, they will just re-exec the shortcut. */
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, cfile.first_displayed);
+ fdata = frame_data_sequence_find(cfile.provider.frames, cfile.first_displayed);
if (fdata->flags.ignored==TRUE) {
ignore_all_displayed_frames(FALSE);
} else {
@@ -1452,7 +1452,7 @@ unignore_all_frames(void)
/* XXX: we might need a progressbar here */
for (framenum = 1; framenum <= cfile.count; framenum++) {
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
set_frame_ignore(FALSE, fdata);
}
redissect_packets();
@@ -1472,7 +1472,7 @@ untime_reference_all_frames(void)
guint32 framenum;
frame_data *fdata;
for (framenum = 1; framenum <= cfile.count && cfile.ref_time_count > 0; framenum++) {
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
if (fdata->flags.ref_time == 1) {
set_frame_reftime(FALSE, fdata, cfile.current_row);
}
@@ -1570,7 +1570,7 @@ packet_list_return_all_comments(GtkTextBuffer *buffer)
for (framenum = 1; framenum <= cfile.count ; framenum++) {
char *pkt_comment;
- fdata = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fdata = frame_data_sequence_find(cfile.provider.frames, framenum);
pkt_comment = cf_get_packet_comment(&cfile, fdata);
if (pkt_comment) {
buf_str = g_strdup_printf("Frame %u: %s \n\n",framenum, pkt_comment);
diff --git a/ui/gtk/packet_win.c b/ui/gtk/packet_win.c
index 29362f1632..98d8bab527 100644
--- a/ui/gtk/packet_win.c
+++ b/ui/gtk/packet_win.c
@@ -198,7 +198,7 @@ void new_packet_window(GtkWidget *w _U_, gboolean reference, gboolean editable _
return;
}
- fd = frame_data_sequence_find(cfile.frame_set_info.frames, framenum);
+ fd = frame_data_sequence_find(cfile.provider.frames, framenum);
}
else {
fd = cfile.current_frame;
diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c
index 13ec853b4e..990b9df8e5 100644
--- a/ui/gtk/summary_dlg.c
+++ b/ui/gtk/summary_dlg.c
@@ -274,7 +274,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
add_string_to_grid(grid, &row, "Packet size limit:", string_buff);
}
- shb_inf = wtap_file_get_shb(cfile.frame_set_info.wth);
+ shb_inf = wtap_file_get_shb(cfile.provider.wth);
/* Capture file comment area */
if (wtap_dump_can_write(cfile.linktypes, WTAP_COMMENT_PER_SECTION)) {
@@ -761,7 +761,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
g_snprintf(string_buff, SUM_STR_MAX, "Capture:\n");
gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);
- shb_inf = wtap_file_get_shb(cfile.frame_set_info.wth);
+ shb_inf = wtap_file_get_shb(cfile.provider.wth);
if (shb_inf != NULL) {
char *str;
@@ -896,7 +896,7 @@ summary_to_texbuff(GtkTextBuffer *buffer)
gtk_text_buffer_insert_at_cursor (buffer, string_buff, -1);
/* Trace file comments from SHB */
- shb_inf = wtap_file_get_shb(cfile.frame_set_info.wth);
+ shb_inf = wtap_file_get_shb(cfile.provider.wth);
if (shb_inf != NULL) {
char *opt_comment;