summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/main_packet_list.c14
-rw-r--r--gtk/main_packet_list.h7
-rw-r--r--gtk/menus.c18
-rw-r--r--gtk/new_packet_list.c15
-rw-r--r--gtk/new_packet_list.h7
-rw-r--r--gtk/summary_dlg.c4
-rw-r--r--summary.c4
-rw-r--r--summary.h1
8 files changed, 67 insertions, 3 deletions
diff --git a/gtk/main_packet_list.c b/gtk/main_packet_list.c
index b4e0ca3707..cf7ee439eb 100644
--- a/gtk/main_packet_list.c
+++ b/gtk/main_packet_list.c
@@ -594,6 +594,19 @@ void packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_)
}
}
+void packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_)
+{
+ frame_data *fdata;
+
+ /* XXX: we might need a progressbar here */
+ for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
+ set_frame_ignore(FALSE,
+ fdata,
+ gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata));
+ }
+ redissect_packets();
+}
+
void packet_list_update_ignored_frames(void)
{
frame_data *fdata;
@@ -607,7 +620,6 @@ void packet_list_update_ignored_frames(void)
gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
fdata));
}
- mark_frames_ready();
}
gboolean
diff --git a/gtk/main_packet_list.h b/gtk/main_packet_list.h
index 9bb915e06b..7488b054a7 100644
--- a/gtk/main_packet_list.h
+++ b/gtk/main_packet_list.h
@@ -103,6 +103,13 @@ extern void packet_list_update_marked_frames(void);
*/
extern void packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_);
+/** Un-ignore all packets in the list.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_);
+
/** Update ignored packages. */
extern void packet_list_update_ignored_frames(void);
diff --git a/gtk/menus.c b/gtk/menus.c
index ac839560ff..d21cf52292 100644
--- a/gtk/menus.c
+++ b/gtk/menus.c
@@ -525,6 +525,18 @@ static GtkItemFactoryEntry menu_items[] =
{"/Edit/_Unmark All Packets", "<control>D", GTK_MENU_FUNC(packet_list_unmark_all_frames_cb), 0, NULL, NULL,},
#endif /* NEW_PACKET_LIST */
{"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
+#ifdef NEW_PACKET_LIST
+ {"/Edit/Ignore Packet (toggle)", "<control>X", GTK_MENU_FUNC(new_packet_list_ignore_frame_cb),
+ 0, NULL, NULL,},
+ {"/Edit/Un-Ignore All Packets", "<shift><control>X", GTK_MENU_FUNC(new_packet_list_unignore_all_frames_cb),
+ 0, NULL, NULL,},
+#else
+ {"/Edit/Ignore Packet (toggle)", "<control>X", GTK_MENU_FUNC(packet_list_ignore_frame_cb),
+ 0, NULL, NULL,},
+ {"/Edit/Un-Ignore All Packets", "<shift><control>X", GTK_MENU_FUNC(packet_list_unignore_all_frames_cb),
+ 0, NULL, NULL,},
+#endif /* NEW_PACKET_LIST */
+ {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
{"/Edit/Set Time Reference (toggle)", "<control>T", GTK_MENU_FUNC(reftime_frame_cb),
REFTIME_TOGGLE, "<StockItem>", WIRESHARK_STOCK_TIME,},
{"/Edit/Find Next Reference", "<alt><shift><control>N", GTK_MENU_FUNC(reftime_frame_cb), REFTIME_FIND_NEXT, NULL, NULL,},
@@ -2719,6 +2731,12 @@ set_menus_for_selected_packet(capture_file *cf)
cf->current_frame != NULL);
set_menu_sensitivity(main_menu_factory, "/Edit/Unmark All Packets",
cf->current_frame != NULL);
+ set_menu_sensitivity(main_menu_factory, "/Edit/Ignore Packet (toggle)",
+ cf->current_frame != NULL);
+ set_menu_sensitivity(main_menu_factory, "/Edit/Un-Ignore All Packets",
+ cf->current_frame != NULL);
+ set_menu_sensitivity(packet_list_menu_factory, "/Ignore Packet (toggle)",
+ cf->current_frame != NULL);
set_menu_sensitivity(main_menu_factory, "/Edit/Set Time Reference (toggle)",
cf->current_frame != NULL);
set_menu_sensitivity(packet_list_menu_factory, "/Set Time Reference (toggle)",
diff --git a/gtk/new_packet_list.c b/gtk/new_packet_list.c
index 9167480363..c25f61fdbd 100644
--- a/gtk/new_packet_list.c
+++ b/gtk/new_packet_list.c
@@ -1065,7 +1065,7 @@ set_frame_mark(gboolean set, frame_data *fdata)
}
static void
-set_frame_ignored(gboolean set, frame_data *fdata)
+set_frame_ignore(gboolean set, frame_data *fdata)
{
if (set)
cf_ignore_frame(&cfile, fdata);
@@ -1169,7 +1169,18 @@ void new_packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_tree_selection_get_selected(selection, &model, &iter);
record = new_packet_list_get_record(model, &iter);
- set_frame_ignored(!record->fdata->flags.ignored, record->fdata);
+ set_frame_ignore(!record->fdata->flags.ignored, record->fdata);
+ redissect_packets();
+}
+
+void new_packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_)
+{
+ frame_data *fdata;
+
+ /* XXX: we might need a progressbar here */
+ for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
+ set_frame_ignore(FALSE, fdata);
+ }
redissect_packets();
}
diff --git a/gtk/new_packet_list.h b/gtk/new_packet_list.h
index fec021fa59..574d401c56 100644
--- a/gtk/new_packet_list.h
+++ b/gtk/new_packet_list.h
@@ -83,6 +83,13 @@ void new_packet_list_unmark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_);
*/
extern void new_packet_list_ignore_frame_cb(GtkWidget *widget, gpointer data);
+/** Un-ignore all packets in the list.
+ *
+ * @param widget parent widget (unused)
+ * @param data unused
+ */
+extern void new_packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_);
+
/* Different modes of copying summary data */
typedef enum {
CS_TEXT, /* Packet summary data (tab separated) */
diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c
index d6df9b6b92..192ef3e58a 100644
--- a/gtk/summary_dlg.c
+++ b/gtk/summary_dlg.c
@@ -282,6 +282,10 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
add_string_to_table(table, &row, "Display filter:", "none");
}
+ /* Ignored packet count */
+ g_snprintf(string_buff, SUM_STR_MAX, "%i", summary.ignored_count);
+ add_string_to_table(table, &row, "Ignored packets:", string_buff);
+
/* Traffic */
list = simple_list_new(4, titles);
gtk_container_add(GTK_CONTAINER(main_vb), list);
diff --git a/summary.c b/summary.c
index 2ef533ffb1..82831b78d4 100644
--- a/summary.c
+++ b/summary.c
@@ -82,6 +82,9 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally)
sum_tally->marked_count++;
sum_tally->marked_bytes += cur_frame->pkt_len ;
}
+ if (cur_frame->flags.ignored){
+ sum_tally->ignored_count++;
+ }
}
void
@@ -103,6 +106,7 @@ summary_fill_in(capture_file *cf, summary_tally *st)
st->marked_start = 0;
st->marked_stop = 0;
st->marked_bytes = 0;
+ st->ignored_count = 0;
/* initialize the tally */
if (cf->plist_start != NULL) {
diff --git a/summary.h b/summary.h
index bb9f98d990..ef32e7b64e 100644
--- a/summary.h
+++ b/summary.h
@@ -40,6 +40,7 @@ typedef struct _summary_tally {
guint64 marked_bytes; /* total bytes in the marked packets */
double marked_start; /* time in seconds, with msec resolution */
double marked_stop; /* time in seconds, with msec resolution */
+ int ignored_count; /* number of ignored packets */
int packet_count; /* total number of packets in trace */
int filtered_count; /* number of filtered packets */
guint64 filtered_bytes; /* total bytes in the filtered packets */