From e57e7d99d5c538d46be4eefe9ef004ffa1de73d9 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Sat, 8 Nov 2014 10:06:12 -0500 Subject: [PATCH] Add i_vlan_membership_untagged() to L3::AlteonAD --- Info/Layer3/AlteonAD.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Info/Layer3/AlteonAD.pm b/Info/Layer3/AlteonAD.pm index 9b733d1e..5ba3372a 100644 --- a/Info/Layer3/AlteonAD.pm +++ b/Info/Layer3/AlteonAD.pm @@ -385,6 +385,20 @@ sub i_vlan_membership { return $i_vlan_membership; } +sub i_vlan_membership_untagged { + my $alteon = shift; + my $partial = shift; + + my $vlans = $alteon->i_vlan($partial); + my $i_vlan_membership = {}; + foreach my $port (keys %$vlans) { + my $vlan = $vlans->{$port}; + push( @{ $i_vlan_membership->{$port} }, $vlan ); + } + + return $i_vlan_membership; +} + # Bridge MIB does not map Bridge Port to ifIndex correctly on some code # versions sub bp_index { @@ -574,6 +588,12 @@ IDs. These are the VLANs which are members of the egress list for the port. print "Port: $port VLAN: $vlan\n"; } +=item $alteon->i_vlan_membership_untagged() + +Returns reference to hash of arrays: key = C, value = array of VLAN +IDs. These are the VLANs which are members of the untagged egress list for +the port. + =item $alteon->v_index() Returns VLAN IDs