1 # Copyright (C) 2011 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., 675 Mass Ave, Cambridge, MA 02139, USA.
17 # Technicolor Thomson xDSL gateways
18 # Only interface indexing and naming is handled here.
20 package Torrus
::DevDiscover
::Thomson_xDSL
;
29 $Torrus::DevDiscover
::registry
{'Thomson_xDSL'} = {
31 'checkdevtype' => \
&checkdevtype
,
32 'discover' => \
&discover
,
33 'buildConfig' => \
&buildConfig
39 'thomson_xDSL_products' => '1.3.6.1.4.1.2863.405',
46 my $devdetails = shift;
48 if( not $dd->oidBaseMatch
49 ( 'thomson_xDSL_products',
50 $devdetails->snmpVar( $dd->oiddef('sysObjectID') ) ) )
55 $devdetails->setCap('interfaceIndexingPersistent');
57 &Torrus
::DevDiscover
::RFC2863_IF_MIB
::addInterfaceFilter
61 'ifType' => 6, # ethernetCsmacd
62 'ifDescr' => '^BRG:' } });
71 my $devdetails = shift;
73 my $data = $devdetails->data();
74 my $session = $dd->session();
76 $data->{'nameref'}{'ifSubtreeName'} = 'ifNameT';
77 $data->{'nameref'}{'ifReferenceName'} = 'ifName';
78 $data->{'nameref'}{'ifNick'} = 'ifIndex';
79 $data->{'nameref'}{'ifNodeid'} = 'ifIndex';
81 undef $data->{'nameref'}{'ifComment'};
83 $data->{'param'}{'snmp-oids-per-pdu'} = 10;
90 my $devdetails = shift;
103 # indent-tabs-mode: nil
104 # perl-indent-level: 4