1 # Copyright (C) 2005 Stanislav Sinyagin
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17 # $Id: RFC1657_BGP4_MIB.pm,v 1.1 2010-12-27 00:03:54 ivan Exp $
18 # Stanislav Sinyagin <ssinyagin@yahoo.com>
20 # Discovery module for BGP4-MIB (RFC 1657)
21 # This module does not generate any XML, but provides information
22 # for other discovery modules. For the sake of discovery time and traffic,
23 # it is not implicitly executed during the normal discovery process.
25 package Torrus::DevDiscover::RFC1657_BGP4_MIB;
34 'bgpPeerRemoteAs' => '1.3.6.1.2.1.15.3.1.9',
43 my $devdetails = shift;
45 my $data = $devdetails->data();
46 my $session = $dd->session();
48 my $table = $session->get_table( -baseoid =>
49 $dd->oiddef('bgpPeerRemoteAs'));
51 if( not defined( $table ) or scalar( %{$table} ) == 0 )
56 $devdetails->storeSnmpVars( $table );
57 $devdetails->setCap('bgpPeerTable');
62 getSnmpIndices( $dd->oiddef('bgpPeerRemoteAs') ) )
67 $devdetails->snmpVar($dd->oiddef('bgpPeerRemoteAs') .
70 $data->{'bgpPeerAS'}{$ipAddr} = $asNum;
83 # indent-tabs-mode: nil
84 # perl-indent-level: 4