aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorEd Warnicke <hagbard@physics.rutgers.edu>2001-07-17 05:32:44 +0000
committerEd Warnicke <hagbard@physics.rutgers.edu>2001-07-17 05:32:44 +0000
commitadd908fabd2e62fe8ab1c5e5a64172b63a3e6543 (patch)
tree258167be1ba5fbf52de536472b52f7836b3b8d37 /file.c
parente55d1a448962d8d52c5b8dd09e970060dbef5c42 (diff)
downloadwireshark-add908fabd2e62fe8ab1c5e5a64172b63a3e6543.tar.gz
wireshark-add908fabd2e62fe8ab1c5e5a64172b63a3e6543.tar.bz2
wireshark-add908fabd2e62fe8ab1c5e5a64172b63a3e6543.zip
Added a "Suppress Unmarked" option to the print dialog to
allow you to suppress the printing of unmarked packets. This allows a user to mark the packets they wish to print and print ONLY those packets by suppressing all other unmarked packets. This may seem like a bit of a convoluted way of expressing things, as usually the desired behavior would be to print the marked packets. However, we do NOT print marked packets that are not displayed under the current filter. To be maximally explicite I've expressed this as suppressing unmarked frames. svn path=/trunk/; revision=3736
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/file.c b/file.c
index b576c1a511..7bb4d48694 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.242 2001/07/05 00:34:38 guy Exp $
+ * $Id: file.c,v 1.243 2001/07/17 05:32:42 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1181,8 +1181,10 @@ print_packets(capture_file *cf, print_args_t *print_args)
}
count++;
-
- if (fdata->flags.passed_dfilter) {
+ /* Check to see if we are suppressing unmarked packets, if so,
+ * suppress them and then proceed to check for visibility.
+ */
+ if (((print_args->suppress_unmarked && fdata->flags.marked ) || !(print_args->suppress_unmarked)) && fdata->flags.passed_dfilter) {
wtap_seek_read (cf->wth, fdata->file_off, &cf->pseudo_header,
cf->pd, fdata->cap_len);
if (print_args->print_summary) {