diff options
author | Guy Harris <guy@alum.mit.edu> | 2010-05-19 02:55:05 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2010-05-19 02:55:05 +0000 |
commit | c1e651802ec438aede4e3cc13e2566874017a729 (patch) | |
tree | 9de420bf8d3d1090eb304e60625e28e110ad7808 | |
parent | ccac9122446e081c69ba3229c31bfa1d3addea59 (diff) |
-S doesn't require an interface, either.
svn path=/trunk/; revision=32883
-rw-r--r-- | dumpcap.c | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -3597,6 +3597,10 @@ main(int argc, char *argv[]) exit_main(0); } + /* + * "-D" requires no interface to be selected; it's supposed to list + * all interfaces. + */ if (list_interfaces) { /* Get the list of interfaces */ GList *if_list; @@ -3636,11 +3640,17 @@ main(int argc, char *argv[]) } /* - * "-D" requires no interface to be selected; it's supposed to list - * all interfaces. - * - * If -D wasn't specified, we have to have an interface; if none - * was specified, pick a default. + * "-S" requires no interface to be selected; it gives statistics + * for all interfaces. + */ + if (print_statistics) { + status = print_statistics_loop(machine_readable); + exit_main(status); + } + + /* + * "-L", and capturing, act on a particular interface, so we have to + * have an interface; if none was specified, pick a default. */ if (capture_opts_trim_iface(&global_capture_opts, NULL) == FALSE) { /* cmdarg_err() already called .... */ @@ -3678,11 +3688,6 @@ main(int argc, char *argv[]) exit_main(0); } - if (print_statistics) { - status = print_statistics_loop(machine_readable); - exit_main(status); - } - /* We're supposed to do a capture. Process the remaining arguments. */ capture_opts_trim_snaplen(&global_capture_opts, MIN_PACKET_SIZE); capture_opts_trim_ring_num_files(&global_capture_opts); |