Commit 5dbdd07f authored by Robert Ricci's avatar Robert Ricci
Browse files

Add a new option to display all experiments - this way, it's farily

easy to see who is using which switch.
parent 1184344b
......@@ -6,6 +6,29 @@
#
use strict;
use English;
use Getopt::Long;
sub usage() {
print "Usage: $0 [-h] [-a]\n";
print " -h Display this message\n";
print " -a Display all VLANs, not just those that cross trunks\n";
return 1;
}
my %opt;
GetOptions(\%opt,'h','a');
if (@ARGV) {
exit usage();
}
if ($opt{h}) {
exit usage();
}
my $show_all = 0;
if ($opt{a}) {
$show_all = 1;
}
#
# Turn off line buffering on output
......@@ -107,7 +130,7 @@ foreach my $vlan (@vlans) {
#
# Report if more than one switch was found
#
if (scalar(keys(%switches)) > 1) {
if ($show_all || (scalar(keys(%switches)) > 1)) {
$pideid = "$pid/$eid";
$members = join(" ", map { "$_ ($switches{$_})" } sort keys %switches);
write;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment