diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-12-03 21:01:18 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-12-04 05:02:18 +0000 |
commit | 1834dca3654ccec238bae130715871be3d8fa344 (patch) | |
tree | 5f1de666575b16f58be5a2f7b4e40cc5b93c02dc /ui/gtk | |
parent | 02944c412b4d9d7661c0a2b3eb9df44d632878ee (diff) |
Move the parts of a capture_file used by libwireshark to a new structure.
Embed one of those structures in a capture_file, and have a struct
epan_session point to that structure rather than to a capture_file.
Pass that structure to the routines that fetch data that libwireshark
uses when dissecting.
That separates the stuff that libwireshark expects from the stuff that
it doesn't look at.
Change-Id: Ia3cd28efb9622476437a2ce32204597fae720877
Reviewed-on: https://code.wireshark.org/review/24692
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk')
-rw-r--r-- | ui/gtk/packet_list.c | 14 | ||||
-rw-r--r-- | ui/gtk/packet_win.c | 2 | ||||
-rw-r--r-- | ui/gtk/summary_dlg.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/ui/gtk/packet_list.c b/ui/gtk/packet_list.c index fca31ca2fe..09c32525c4 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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, cfile.first_displayed); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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.frames, framenum); + fdata = frame_data_sequence_find(cfile.frame_set_info.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 4a602b094c..29362f1632 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.frames, framenum); + fd = frame_data_sequence_find(cfile.frame_set_info.frames, framenum); } else { fd = cfile.current_frame; diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c index 8d37d857f4..13ec853b4e 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.wth); + shb_inf = wtap_file_get_shb(cfile.frame_set_info.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.wth); + shb_inf = wtap_file_get_shb(cfile.frame_set_info.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.wth); + shb_inf = wtap_file_get_shb(cfile.frame_set_info.wth); if (shb_inf != NULL) { char *opt_comment; |