diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2009-12-17 01:18:14 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2009-12-17 01:18:14 +0000 |
commit | 47be3577a731492ab1667fdc39233094051c01a6 (patch) | |
tree | 8239ff427bfe4e5c475b4f8429f0fef9186cf773 /file.c | |
parent | faec4bde007d7d17da690477b7736059394c09fd (diff) | |
download | wireshark-47be3577a731492ab1667fdc39233094051c01a6.tar.gz |
Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.
svn path=/trunk/; revision=31287
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -310,6 +310,7 @@ cf_open(capture_file *cf, const char *fname, gboolean is_tempfile, int *err) cf->count = 0; cf->displayed_count = 0; cf->marked_count = 0; + cf->ignored_count = 0; cf->drops_known = FALSE; cf->drops = 0; cf->snap = wtap_snapshot_length(cf->wth); @@ -1273,6 +1274,9 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, if (fdata->flags.marked) { packet_list_set_colors(row, &prefs.gui_marked_fg, &prefs.gui_marked_bg); } + if (fdata->flags.ignored) { + packet_list_set_colors(row, &prefs.gui_ignored_fg, &prefs.gui_ignored_bg); + } cf->displayed_count++; } @@ -4072,6 +4076,32 @@ cf_unmark_frame(capture_file *cf, frame_data *frame) } } +/* + * Ignore a particular frame. + */ +void +cf_ignore_frame(capture_file *cf, frame_data *frame) +{ + if (! frame->flags.ignored) { + frame->flags.ignored = TRUE; + if (cf->count > cf->ignored_count) + cf->ignored_count++; + } +} + +/* + * Un-ignore a particular frame. + */ +void +cf_unignore_frame(capture_file *cf, frame_data *frame) +{ + if (frame->flags.ignored) { + frame->flags.ignored = FALSE; + if (cf->ignored_count > 0) + cf->ignored_count--; + } +} + typedef struct { wtap_dumper *pdh; const char *fname; |