aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-06-05 00:08:37 +0000
committerGuy Harris <guy@alum.mit.edu>2010-06-05 00:08:37 +0000
commit71ada2c31b8475a0ad913a9cc1f1f5e95f4380fb (patch)
tree256e291c847d658d3dc8ef732362f2614620d443 /tshark.c
parent28d7c735885e1f8b6899abaf88f734481712bc60 (diff)
Catch some cases that don't currently work.
svn path=/trunk/; revision=33100
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index 052af0cb68..6fd0b23c3b 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1457,6 +1457,11 @@ main(int argc, char *argv[])
return 1;
}
}
+ /* Currently, we don't support read filters when capturing. */
+ if (rfilter != NULL) {
+ cmdarg_err("Read filters aren't supported when capturing.");
+ return 1;
+ }
} else {
/* They didn't specify a "-w" flag, so we won't be saving to a
capture file. Check for options that only make sense if
@@ -1491,6 +1496,20 @@ main(int argc, char *argv[])
of the filter. We can now process all the "-z" arguments. */
start_requested_stats();
+ /* We currently don't support taps, or printing dissected packets,
+ if we're writing to a pipe. */
+ if (global_capture_opts.saving_to_file &&
+ global_capture_opts.output_to_pipe) {
+ if (have_tap_listeners()) {
+ cmdarg_err("Taps aren't supported when saving to a pipe.");
+ return 1;
+ }
+ if (print_packet_info) {
+ cmdarg_err("Printing dissected packets isn't supported when saving to a pipe.");
+ return 1;
+ }
+ }
+
/* disabled protocols as per configuration file */
if (gdp_path == NULL && dp_path == NULL) {
set_disabled_protos_list();