diff options
Diffstat (limited to 'tests/isip.pl')
-rw-r--r-- | tests/isip.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/isip.pl b/tests/isip.pl new file mode 100644 index 00000000..35a04b7a --- /dev/null +++ b/tests/isip.pl @@ -0,0 +1,23 @@ +#! /usr/bin/perl + +# Standalone test for Vyatta::Misc::isIPInterfaces + +use strict; +use warnings; +use Vyatta::Misc; +use Vyatta::Interface; + +my $vc; +my @interfaces = getInterfaces(); +print "Interfaces: ", join(' ',@interfaces),"\n"; + +foreach my $lip (@ARGV) { + print $lip, " is"; + if (Vyatta::Misc::isIPinInterfaces($vc, $lip, @interfaces)) { + print " in\n"; + } else { + print " not in\n"; + } +} + +exit 0; |