summaryrefslogtreecommitdiff
path: root/scripts/vtiIntf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vtiIntf.pm')
-rwxr-xr-xscripts/vtiIntf.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/vtiIntf.pm b/scripts/vtiIntf.pm
index 4844873..79d1551 100755
--- a/scripts/vtiIntf.pm
+++ b/scripts/vtiIntf.pm
@@ -30,6 +30,7 @@ use strict;
# Collect set of existing Vti's.
my %existingVtiName = ();
+my %existingVtibyName = ();
my %existingVtiMark = ();
my @VtiMarks;
my $vtiMarkBase = 0x90000000;
@@ -46,6 +47,7 @@ sub discoverVtiIntfs {
$existingVtiName{$key} = $name;
$existingVtiMark{$key} = $mark;
$VtiMarks[$mark-$vtiMarkBase] = 1;
+ $existingVtibyName{$name} = 1;
}
}
}
@@ -140,4 +142,23 @@ sub freeVtiMark {
return 0;
}
+sub isVtibynamepresent {
+ my ($name) = @_;
+ if (exists $existingVtibyName{$name} ) {
+ return $existingVtibyName{$name};
+ }
+ return 0;
+}
+
+sub deleteVtibyname {
+ my ($name) = @_;
+ if (exists $existingVtibyName{$name} ) {
+ delete $existingVtibyName{$name};
+ }
+}
+
+sub getVtibyNames {
+ return (\%existingVtibyName);
+}
+
1;