-S doesn't require an interface, either.

svn path=/trunk/; revision=32883
This commit is contained in:
Guy Harris 2010-05-19 02:55:05 +00:00
parent ccac912244
commit c1e651802e
1 changed files with 15 additions and 10 deletions

View File

@ -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);