summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/snmp/if-mib-alias7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/snmp/if-mib-alias b/scripts/snmp/if-mib-alias
index c713bfe8..82431356 100755
--- a/scripts/snmp/if-mib-alias
+++ b/scripts/snmp/if-mib-alias
@@ -54,10 +54,17 @@ sub get_oid {
print "$oid\nstring\n$ifalias\n" if $ifalias;
}
+my $BASE = '.1.3.6.1.2.1.31.1.1.1.18';
+
sub get_next {
my $oid = shift;
+
+ return get_next("$BASE.0")
+ if ($oid eq $BASE);
+
die "Not a valid Object ID: $oid"
unless ($oid =~ /^([0-9.]*)\.(\d)$/);
+
my $base = $1;
my $ifindex = $2;
my @interfaces = get_alias();