diff options
Diffstat (limited to 'tests/interface.pl')
-rw-r--r-- | tests/interface.pl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/interface.pl b/tests/interface.pl index 5fe4278..989d6c5 100644 --- a/tests/interface.pl +++ b/tests/interface.pl @@ -19,12 +19,18 @@ foreach my $arg (@ARGV) { my $vif = $intf->vif(); print "vif=$vif " if $vif; - printf "path = '%s' device=%s\n", $intf->path(), $intf->physicalDevice(); + printf "path = '%s'\ndevice=%s\n", $intf->path(), $intf->physicalDevice(); - foreach my $attr (qw(exists configured disabled dhcp address up running)) { - my $val = $intf->$attr(); + my @addresses = $intf->address(); + if ($#addresses eq -1) { + print "address is no set\n"; + } else { + print "address ", join(' ',@addresses), "\n"; + } - if ($val) { + foreach my $attr (qw(exists configured disabled using up running)) { + my $val = $intf->$attr(); + if (defined $val) { print "\t$attr = $val\n"; } else { print "\t$attr is not set\n"; |