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;
}
/*
- * "-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 .... */
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);