summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Interface.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-18 10:09:23 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-18 10:09:23 -0800
commit06d822175c89242b4a0246d84a4e5611a8233a8f (patch)
tree1efdacfa6e409934ebac1333c1732c1f2b901d05 /lib/Vyatta/Interface.pm
parent6e5cd24a9b13b317443cc24749da486ec84930f3 (diff)
downloadvyatta-cfg-06d822175c89242b4a0246d84a4e5611a8233a8f.tar.gz
vyatta-cfg-06d822175c89242b4a0246d84a4e5611a8233a8f.zip
Add Vyatta::Interface::get_interfaces
Hook to get types listed in net_prefix table.
Diffstat (limited to 'lib/Vyatta/Interface.pm')
-rw-r--r--lib/Vyatta/Interface.pm7
1 files changed, 7 insertions, 0 deletions
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;