| 1 | # SNMP::Info::IEEE802_Bridge | ||
| 2 | # | ||
| 3 | # Changes since Version 0.7 Copyright (c) 2004 Max Baker | ||
| 4 | # All rights reserved. | ||
| 5 | # | ||
| 6 | # Copyright (c) 2002,2003 Regents of the University of California | ||
| 7 | # All rights reserved. | ||
| 8 | # | ||
| 9 | # Redistribution and use in source and binary forms, with or without | ||
| 10 | # modification, are permitted provided that the following conditions are met: | ||
| 11 | # | ||
| 12 | # * Redistributions of source code must retain the above copyright notice, | ||
| 13 | # this list of conditions and the following disclaimer. | ||
| 14 | # * Redistributions in binary form must reproduce the above copyright | ||
| 15 | # notice, this list of conditions and the following disclaimer in the | ||
| 16 | # documentation and/or other materials provided with the distribution. | ||
| 17 | # * Neither the name of the University of California, Santa Cruz nor the | ||
| 18 | # names of its contributors may be used to endorse or promote products | ||
| 19 | # derived from this software without specific prior written permission. | ||
| 20 | # | ||
| 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| 22 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 23 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 24 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
| 25 | # LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 26 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 27 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 28 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 29 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 30 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 31 | # POSSIBILITY OF SUCH DAMAGE. | ||
| 32 | |||
| 33 | package SNMP::Info::IEEE802_Bridge; | ||
| 34 | |||
| 35 | use strict; | ||
| 36 | use warnings; | ||
| 37 | use Exporter; | ||
| 38 | use SNMP::Info; | ||
| 39 | |||
| 40 | @SNMP::Info::IEEE802_Bridge::ISA = qw/SNMP::Info Exporter/; | ||
| 41 | @SNMP::Info::IEEE802_Bridge::EXPORT_OK = qw//; | ||
| 42 | |||
| 43 | our ($VERSION, $DEBUG, %MIBS, %FUNCS, %GLOBALS, %MUNGE, $INIT); | ||
| 44 | |||
| 45 | $VERSION = '3.985003'; | ||
| 46 | |||
| 47 | %MIBS = ( | ||
| 48 | 'IEEE8021-Q-BRIDGE-MIB' => 'ieee8021QBridgeVlanCurrentEgressPorts', | ||
| 49 | ); | ||
| 50 | |||
| 51 | %GLOBALS = ( | ||
| 52 | ); | ||
| 53 | |||
| 54 | %FUNCS = ( | ||
| 55 | 'iqb_i_vlan' => 'ieee8021QBridgePvid', | ||
| 56 | 'iqb_i_vlan_type' => 'ieee8021QBridgePortAcceptableFrameTypes', | ||
| 57 | 'iqb_i_vlan_in_flt' => 'ieee8021QBridgePortIngressFiltering', | ||
| 58 | |||
| 59 | 'iqb_cv_egress' => 'ieee8021QBridgeVlanCurrentEgressPorts', | ||
| 60 | 'iqb_cv_untagged' => 'ieee8021QBridgeVlanCurrentUntaggedPorts', | ||
| 61 | 'iqb_cv_stat' => 'ieee8021QBridgeVlanStatus', | ||
| 62 | |||
| 63 | 'iqb_v_name' => 'ieee8021QBridgeVlanStaticName', | ||
| 64 | 'iqb_v_egress' => 'ieee8021QBridgeVlanStaticEgressPorts', | ||
| 65 | 'iqb_v_fbdn_egress' => 'ieee8021QBridgeVlanForbiddenEgressPorts', | ||
| 66 | 'iqb_v_untagged' => 'ieee8021QBridgeVlanStaticUntaggedPorts', | ||
| 67 | 'iqb_v_stat' => 'ieee8021QBridgeVlanStaticRowStatus', | ||
| 68 | |||
| 69 | ); | ||
| 70 | |||
| 71 | %MUNGE = ( | ||
| 72 | |||
| 73 | # Inherit all the built in munging | ||
| 74 | %SNMP::Info::MUNGE, | ||
| 75 | |||
| 76 | # Add ones for our class | ||
| 77 | 'iqb_cv_egress' => \&SNMP::Info::munge_port_list, | ||
| 78 | 'iqb_cv_untagged' => \&SNMP::Info::munge_port_list, | ||
| 79 | 'iqb_v_egress' => \&SNMP::Info::munge_port_list, | ||
| 80 | 'iqb_v_fbdn_egress' => \&SNMP::Info::munge_port_list, | ||
| 81 | 'iqb_v_untagged' => \&SNMP::Info::munge_port_list, | ||
| 82 | |||
| 83 | ); | ||
| 84 | |||
| 85 | 1; | ||
| 86 | |||
| 87 | __END__ |