blob: 35a04b7a78eb50642b08300aa2c92ad474d45876 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
|