From 9b2229e3eb6c45d956c9037016b638fe8e2405ba Mon Sep 17 00:00:00 2001 From: Eric Miller <> Date: Thu, 29 Sep 2005 02:48:45 +0000 Subject: [PATCH] remove root_ip() --- Info/Layer3/Contivity.pm | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) diff --git a/Info/Layer3/Contivity.pm b/Info/Layer3/Contivity.pm index 0f078ccc..29ce40e6 100644 --- a/Info/Layer3/Contivity.pm +++ b/Info/Layer3/Contivity.pm @@ -146,31 +146,17 @@ sub i_name { my %i_name; foreach my $iid (keys %$i_name2){ - my $name = $i_name2->{$iid}; - #Skip everything except Ethernet interfaces - next unless (defined $name and $name =~ /fe/i); - - $name = $1 if $name =~ /(fei\.\d+\.\d+)/; - - $i_name{$iid} = $name; + my $name = $i_name2->{$iid}; + #Skip everything except Ethernet interfaces + next unless (defined $name and $name =~ /fe/i); + + $name = $1 if $name =~ /(fei\.\d+\.\d+)/; + + $i_name{$iid} = $name; } return \%i_name; } -sub root_ip { - my $contivity = shift; - my $ip_table = $contivity->ip_table(); - -# Return First IP Address - foreach my $entry (keys %$ip_table){ - my $router_ip = $ip_table->{$entry}; - print " SNMP::Layer3::Contivity::root_ip() using $router_ip\n" if $contivity->debug(); - next unless $router_ip; - return $router_ip if ($router_ip ne '0.0.0.0'); - } - return undef; -} - 1; __END__ @@ -264,11 +250,6 @@ Returns the chassis serial number. Returns the MAC address of the first Ethernet Interface. -=item $contivity->root_ip() - -Returns the primary IP used to communicate with the router. Returns the first -IP interface. - =back =head2 Overrides