From 99ea2c9a2bfc9f4af221ca735d26410dae3b2823 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 12 Jan 2009 14:35:47 -0800 Subject: Remove unused functions htonl and if_nametoindex are not used. --- scripts/vyatta-interfaces.pl | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 31b7d8d..a39cde4 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -295,22 +295,6 @@ sub update_eth_addrs { exit 1; } -sub if_nametoindex { - my ($intf) = @_; - - open my $sysfs, "<", "/sys/class/net/$intf/ifindex" - || die "Unknown interface $intf"; - my $ifindex = <$sysfs>; - close($sysfs) or die "read sysfs error\n"; - chomp $ifindex; - - return $ifindex; -} - -sub htonl { - return unpack('L',pack('N',shift)); -} - sub delete_eth_addrs { my ($addr, $intf) = @_; -- cgit v1.2.3