From 06d822175c89242b4a0246d84a4e5611a8233a8f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 18 Feb 2009 10:09:23 -0800 Subject: Add Vyatta::Interface::get_interfaces Hook to get types listed in net_prefix table. --- lib/Vyatta/Interface.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 017b7e4..c37d77a 100644 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -71,6 +71,13 @@ my %net_prefix = ( 'wlm[\d]+' => { path => 'wireless-modem' }, ); +# get list of interface types +sub interface_types { + my @types = map { $net_prefix{$_}{path} } keys %net_prefix; + return @types; +} + +# new interface description object sub new { my $that = shift; my $name = pop; -- cgit v1.2.3