From 8dae0aad96a025260ca56c13aec2189e1f3af249 Mon Sep 17 00:00:00 2001 From: Max Baker <> Date: Fri, 18 Feb 2005 03:34:23 +0000 Subject: [PATCH] took out some kludy cisco-specific stuff from interfaces() --- Info/Layer2.pm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Info/Layer2.pm b/Info/Layer2.pm index 0f3d4ea8..e71a3308 100644 --- a/Info/Layer2.pm +++ b/Info/Layer2.pm @@ -156,25 +156,20 @@ sub interfaces { my $l2 = shift; my $interfaces = $l2->i_index(); my $i_descr = $l2->i_description(); - my $i_name = $l2->i_name(); + #my $i_name = $l2->i_name(); my %if; foreach my $iid (keys %$interfaces){ my $port = $i_descr->{$iid}; - my $name = $i_name->{$iid}; - $port = $name if (defined $name and $name !~ /^\s*$/); - next unless defined $port; - # Cisco 1900 has a space in some of its port descr. - # get rid of any weird characters - $port =~ s/[^\d\/,()\w]+//gi; - - # Translate Cisco 2926,etc. from 1/5 to 1.5 - $port =~ s/\//\./ if ($port =~ /^\d+\/\d+$/); + # what device was this good for? bad idea. + #my $name = $i_name->{$iid}; + #$port = $name if (defined $name and $name !~ /^\s*$/); + + next unless defined $port; $if{$iid} = $port; } - return \%if }