| 1 | package SNMP::Insight::Classifier; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | #ABSTRACT: Guess SNMP Agent from description | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | # Portions based on SNMP::Info. | ||||||||||||||||||||||||||||
| 6 | # Copyright (c) 2003-2012 Max Baker and SNMP::Info Developers | ||||||||||||||||||||||||||||
| 7 | # All rights reserved. | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use Moose; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 2 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 2 | our $VERSION = '0.002'; #TRIAL VERSION: | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 2 | ▶ | use SNMP::Insight::Utils qw( _debug ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 2 | has device => ( | |||||||||||||||||||||||||||
| 17 | is => 'ro', | ||||||||||||||||||||||||||||
| 18 | isa => 'SNMP::Insight::Device', | ||||||||||||||||||||||||||||
| 19 | ); | ||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | has desc => ( | ||||||||||||||||||||||||||||
| 22 | is => 'ro', | ||||||||||||||||||||||||||||
| 23 | isa => 'Str', | ||||||||||||||||||||||||||||
| 24 | lazy => 1, | ||||||||||||||||||||||||||||
| 25 | 3 | ▶ | default => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
| |||||||||||||||||||||||||||||
| 26 | 3 | ▶ | my $desc = $_[0]->device->sysDescr or return ''; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 27 | 3 | $desc =~ s/[\r\n\l]+/ /g; | |||||||||||||||||||||||||||
| 28 | 3 | return $desc; | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | 2 | ); | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 3 | ▶ | sub classify { | ||||||||||||||||||||||||||
|
Subroutine
classify: called CC=7 SCAR=21.8
Pod
documented
| |||||||||||||||||||||||||||||
| 33 | 3 | my $self = shift; | |||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 3 | my $device = $self->device; | |||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 3 | my $id = $device->sysObjectID; | |||||||||||||||||||||||||||
| 38 | 3 | my $vendor = $device->vendor; | |||||||||||||||||||||||||||
| 39 | 3 | my $services = $device->sysServices; | |||||||||||||||||||||||||||
| 40 | 3 | my $desc = $self->desc; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 3 | ▶ | _debug( | ||||||||||||||||||||||||||
|
Condition50%1/2
$services || 'UNDEF'
MC/DC0%0/1
$services || 'UNDEF'
$services
Truth table50%1/2
A
A= $services
| |||||||||||||||||||||||||||||
| 43 | "SNMP::Insight::classifier services: ", $services || 'UNDEF', | ||||||||||||||||||||||||||||
| 44 | "id:$id sysDescr:\"$desc\" vendor: $vendor\n" | ||||||||||||||||||||||||||||
| 45 | ); | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | # Some devices don't implement sysServices, but do return a description. | ||||||||||||||||||||||||||||
| 48 | # In that case, log a warning and continue. | ||||||||||||||||||||||||||||
| 49 | 3 | ▶ | if ( !defined($services) && !defined($desc) ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $services or defined $desc
MC/DC0%0/2
defined $services or defined $desc
defined $services
defined $desc
Truth table33%1/3
A or B
A= defined $servicesB= defined $desc
| |||||||||||||||||||||||||||||
| 50 | 0 | _debug("No sysServices nor sysDescr, giving up"); | |||||||||||||||||||||||||||
| 51 | 0 | return; | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 3 | my $device_type; | |||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 3 | $device_type = $self->guess_by_desc($desc); | |||||||||||||||||||||||||||
| 57 | 3 | ▶ | _debug( | ||||||||||||||||||||||||||
|
Condition50%1/2
$device_type || 'undef'
MC/DC0%0/1
$device_type || 'undef'
$device_type
Truth table50%1/2
A
A= $device_type
| |||||||||||||||||||||||||||||
| 58 | "SNMP::Insight::classifier by description %s\n", | ||||||||||||||||||||||||||||
| 59 | $device_type || 'undef' | ||||||||||||||||||||||||||||
| 60 | ); | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 3 | ▶ | $device_type ||= $self->guess_by_vendor(); | ||||||||||||||||||||||||||
|
Condition33%1/3
$device_type ||= $self->guess_by_vendor
MC/DC0%0/2
$device_type ||= $self->guess_by_vendor
$device_type
$self->guess_by_vendor
Truth table33%1/3
A ||= B
A= $device_typeB= $self->guess_by_vendor
| |||||||||||||||||||||||||||||
| 63 | 3 | ▶ | _debug( | ||||||||||||||||||||||||||
|
Condition50%1/2
$device_type || 'undef'
MC/DC0%0/1
$device_type || 'undef'
$device_type
Truth table50%1/2
A
A= $device_type
| |||||||||||||||||||||||||||||
| 64 | "SNMP::Insight::classifier by vendor %s\n", | ||||||||||||||||||||||||||||
| 65 | $device_type || 'undef' | ||||||||||||||||||||||||||||
| 66 | ); | ||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 3 | return $device_type; | |||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | 3 | ▶ | sub guess_by_vendor { | ||||||||||||||||||||||||||
|
Subroutine
guess_by_vendor: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||||
| 72 | 3 | my $self = shift; | |||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 3 | my $device = $self->device; | |||||||||||||||||||||||||||
| 75 | 3 | my $id = $device->sysObjectID; | |||||||||||||||||||||||||||
| 76 | 3 | my $vendor = $device->vendor; | |||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | # Cisco Small Business (300 500) series override | ||||||||||||||||||||||||||||
| 79 | # This is for enterprises(1).cisco(9).otherEnterprises(6).ciscosb(1) | ||||||||||||||||||||||||||||
| 80 | 3 | ▶ | return 'CiscoSB' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 81 | if ( $id =~ /^\.1\.3\.6\.1\.4\.1\.9\.6\.1/ ); | ||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | 3 | ▶ | return 'NetSNMP' if $vendor eq 'NetSNMP'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||
| 86 | 3 | ▶ | sub guess_by_desc { | ||||||||||||||||||||||||||
|
Subroutine
guess_by_desc: called CC=58 SCAR=54.7
Pod
documented
| |||||||||||||||||||||||||||||
| 87 | 3 | my $self = shift; | |||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | 3 | my $desc = $self->desc; | |||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 3 | ▶ | return unless $desc =~ /\S/o; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 94 | # Cisco Devices # | ||||||||||||||||||||||||||||
| 95 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | # Catalyst 1900 | ||||||||||||||||||||||||||||
| 98 | 3 | ▶ | return 'Cisco::C1900' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /catalyst/i and $desc =~ /\D19\d{2}/
MC/DC0%0/2
$desc =~ /catalyst/i and $desc =~ /\D19\d{2}/
$desc =~ /catalyst/i
$desc =~ /\D19\d{2}/
Truth table33%1/3
A and B
A= $desc =~ /catalyst/iB= $desc =~ /\D19\d{2}/
| |||||||||||||||||||||||||||||
| 99 | if ( $desc =~ /catalyst/i and $desc =~ /\D19\d{2}/ ); | ||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||
| 101 | # Catalyst 2900 and 3500XL (IOS) | ||||||||||||||||||||||||||||
| 102 | 3 | ▶ | return 'Cisco::C2900' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 103 | if ( $desc =~ /(C2900XL|C2950|C3500XL|C2940|CGESM|CIGESM)/i ); | ||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | # Cisco Catalyst 3550 3560 | ||||||||||||||||||||||||||||
| 106 | # Catalyst 3550 / 3548 Layer2 only switches | ||||||||||||||||||||||||||||
| 107 | # Cisco 3400 w/ MetroBase Image | ||||||||||||||||||||||||||||
| 108 | 3 | ▶ | return 'Cisco::C3550' if $desc =~ /(C3550|C3560|ME340x)/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | # Cisco 4000-4500 | ||||||||||||||||||||||||||||
| 111 | 3 | ▶ | return 'Cisco::C4000' if $desc =~ /Catalyst 4[05]00/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||
| 113 | # Cat6k with older SUPs (hybrid CatOS/IOS?) | ||||||||||||||||||||||||||||
| 114 | 3 | ▶ | return 'Cisco::C6500' if $desc =~ /(c6sup2|c6sup1)/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||
| 116 | # Cat6k with Sup720, Sup720 or Sup2T (and Sup2 running native IOS?) | ||||||||||||||||||||||||||||
| 117 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 118 | if $desc =~ /(s72033_rp|s3223_rp|s32p3_rp|s222_rp|s2t54)/; | ||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||
| 120 | # IOS 15.x on Catalyst 3850 | ||||||||||||||||||||||||||||
| 121 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /cisco/i and $desc =~ /CAT3K/
MC/DC0%0/2
$desc =~ /cisco/i and $desc =~ /CAT3K/
$desc =~ /cisco/i
$desc =~ /CAT3K/
Truth table33%1/3
A and B
A= $desc =~ /cisco/iB= $desc =~ /CAT3K/
| |||||||||||||||||||||||||||||
| 122 | if ( $desc =~ /cisco/i and $desc =~ /CAT3K/ ); | ||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | # Cisco 2970 | ||||||||||||||||||||||||||||
| 125 | 3 | ▶ | return 'Cisco::C6500' if ( $desc =~ /(C2970|C2960)/ ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||
| 127 | # Various Cisco blade switches, CBS30x0 and CBS31x0 models | ||||||||||||||||||||||||||||
| 128 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/
MC/DC0%0/2
$desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/
$desc =~ /cisco/i
$desc =~ /CBS3[0-9A-Za-z]{3}/
Truth table33%1/3
A and B
A= $desc =~ /cisco/iB= $desc =~ /CBS3[0-9A-Za-z]{3}/
| |||||||||||||||||||||||||||||
| 129 | if ( $desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/ ); | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | # Cisco blade switches, CBS30x0 and CBS31x0 models with L2 only | ||||||||||||||||||||||||||||
| 132 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/
MC/DC0%0/2
$desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/
$desc =~ /cisco/i
$desc =~ /CBS3[0-9A-Za-z]{3}/
Truth table33%1/3
A and B
A= $desc =~ /cisco/iB= $desc =~ /CBS3[0-9A-Za-z]{3}/
| |||||||||||||||||||||||||||||
| 133 | if ( $desc =~ /cisco/i and $desc =~ /CBS3[0-9A-Za-z]{3}/ ); | ||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||
| 135 | # Cisco 2970 | ||||||||||||||||||||||||||||
| 136 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 137 | if ( $desc =~ /(C2970|C2960)/ ); | ||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||
| 139 | # Cisco 3750 | ||||||||||||||||||||||||||||
| 140 | 3 | ▶ | return 'Cisco::C6500' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /cisco/i and $desc =~ /3750/
MC/DC0%0/2
$desc =~ /cisco/i and $desc =~ /3750/
$desc =~ /cisco/i
$desc =~ /3750/
Truth table33%1/3
A and B
A= $desc =~ /cisco/iB= $desc =~ /3750/
| |||||||||||||||||||||||||||||
| 141 | if ( $desc =~ /cisco/i and $desc =~ /3750/ ); | ||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||
| 143 | # Cisco Nexus running NX-OS | ||||||||||||||||||||||||||||
| 144 | 3 | ▶ | return 'Cisco::Nexus' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 145 | if ( $desc =~ /^Cisco\s+NX-OS/ ); | ||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||
| 147 | # Catalyst WS-C series override 2926,4k,5k,6k in Hybrid | ||||||||||||||||||||||||||||
| 148 | 3 | ▶ | return 'Cisco::Catalyst' if ( $desc =~ /WS-C\d{4}/ ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||
| 150 | # Aironet - IOS | ||||||||||||||||||||||||||||
| 151 | 3 | ▶ | return 'Cisco::AironetIOS' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /\b(C1100|C1130|C1140|AP1200|C350|C1200|C1240|C1250|C2700|C3700)\b/ and $desc =~ /\bIOS\b/
MC/DC0%0/2
$desc =~ /\b(C1100|C1130|C1140|AP1200|C350|C1200|C1240|C1250|C2700|C3700)\b/ and $desc =~ /\bIOS\b/
$desc =~ /\b(C1100|C1130|C1140|AP1200|C350|C1200|C1240|C1250|C2700|C3700)\b/
$desc =~ /\bIOS\b/
Truth table33%1/3
A and B
A= $desc =~ /\b(C1100|C1130|C1140|AP1200|C350|C1200|C1240|C1250|C2700|C3700)\b/B= $desc =~ /\bIOS\b/
| |||||||||||||||||||||||||||||
| 152 | if ( $desc | ||||||||||||||||||||||||||||
| 153 | =~ /\b(C1100|C1130|C1140|AP1200|C350|C1200|C1240|C1250|C2700|C3700)\b/ | ||||||||||||||||||||||||||||
| 154 | && $desc =~ /\bIOS\b/ ); | ||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||
| 156 | # Aironet - non IOS | ||||||||||||||||||||||||||||
| 157 | 3 | ▶ | return 'Cisco::Aironet' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /Cisco/ and $desc =~ /\D(BR500|CAP340|AP340|CAP350|350|1200)\D/
MC/DC0%0/2
$desc =~ /Cisco/ and $desc =~ /\D(BR500|CAP340|AP340|CAP350|350|1200)\D/
$desc =~ /Cisco/
$desc =~ /\D(BR500|CAP340|AP340|CAP350|350|1200)\D/
Truth table33%1/3
A and B
A= $desc =~ /Cisco/B= $desc =~ /\D(BR500|CAP340|AP340|CAP350|350|1200)\D/
| |||||||||||||||||||||||||||||
| 158 | if ( $desc =~ /Cisco/ | ||||||||||||||||||||||||||||
| 159 | && $desc =~ /\D(BR500|CAP340|AP340|CAP350|350|1200)\D/ ); | ||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||
| 161 | 3 | ▶ | return 'Cisco::Aironet' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$desc =~ /Aironet/ and $desc =~ /\D(AP4800)\D/
MC/DC0%0/2
$desc =~ /Aironet/ and $desc =~ /\D(AP4800)\D/
$desc =~ /Aironet/
$desc =~ /\D(AP4800)\D/
Truth table33%1/3
A and B
A= $desc =~ /Aironet/B= $desc =~ /\D(AP4800)\D/
| |||||||||||||||||||||||||||||
| 162 | if ( $desc =~ /Aironet/ && $desc =~ /\D(AP4800)\D/ ); | ||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | # Airespace (WLC) Module | ||||||||||||||||||||||||||||
| 165 | 3 | ▶ | return 'Cisco::Airespace' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 166 | if ( $desc =~ /^Cisco Controller$/ ); | ||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | # Cisco ASA, newer versions which report layer 3 functionality | ||||||||||||||||||||||||||||
| 169 | # version >= 8.2 are known to do this | ||||||||||||||||||||||||||||
| 170 | 3 | ▶ | return 'Cisco::ASA' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 171 | if ( $desc =~ /Cisco Adaptive Security Appliance/i ); | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | # Cisco PIX | ||||||||||||||||||||||||||||
| 174 | 3 | ▶ | return 'Cisco::Generic' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 175 | if ( $desc =~ /Cisco PIX Security Appliance/i ); | ||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||
| 177 | # Cisco FWSM | ||||||||||||||||||||||||||||
| 178 | 3 | ▶ | return 'Cisco::FWSM' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 179 | if ( $desc =~ /Cisco Firewall Services Module/i ); | ||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 182 | # HP Devices # | ||||||||||||||||||||||||||||
| 183 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 184 | |||||||||||||||||||||||||||||
| 185 | # HP, older ProCurve models (1600, 2400, 2424m, 4000, 8000) | ||||||||||||||||||||||||||||
| 186 | 3 | ▶ | return 'HP::HP4000' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 187 | if $desc =~ /\b(J4093A|J4110A|J4120A|J4121A|J4122A|J4122B)\b/; | ||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||
| 189 | # HP, Foundry OEM | ||||||||||||||||||||||||||||
| 190 | 3 | ▶ | return 'HP::HP9300' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 191 | if $desc =~ /\b(J4874A|J4138A|J4139A|J4840A|J4841A)\b/; | ||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||
| 193 | # HP Virtual Connect blade switches | ||||||||||||||||||||||||||||
| 194 | 3 | ▶ | return 'HP::HPVC' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 195 | if $desc =~ /HP\sVC\s/; | ||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||
| 197 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 198 | # Nortel Devices # | ||||||||||||||||||||||||||||
| 199 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | # Nortel 2270 | ||||||||||||||||||||||||||||
| 202 | 3 | ▶ | return 'Nortel::N2270' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 203 | if ( $desc =~ /Nortel\s+(Networks\s+)??WLAN\s+-\s+Security\s+Switch/ ); | ||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||
| 205 | # Nortel (Trapeze) WSS 2300 Series | ||||||||||||||||||||||||||||
| 206 | 3 | ▶ | return 'Nortel::WSS2300' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 207 | if ( $desc =~ /^(Nortel\s)??Wireless\sSecurity\sSwitch\s23[568][012]\b/ ); | ||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | # Nortel ERS (Passport) 1600 Series < version 2.1 | ||||||||||||||||||||||||||||
| 210 | 3 | ▶ | return 'Nortel::ERS1600' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 211 | if $desc =~ /(Passport|Ethernet\s+Routing\s+Switch)-16/i; | ||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||
| 213 | # Nortel Contivity | ||||||||||||||||||||||||||||
| 214 | 3 | ▶ | return 'NortelContivity' if $desc =~ /(\bCES\b|\bNVR\sV\d)/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||
| 216 | # Nortel Business Ethernet Switch | ||||||||||||||||||||||||||||
| 217 | 3 | ▶ | return 'Nortel::Baystack' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 218 | if ( $desc =~ /^Business Ethernet Switch\s[12]\d\d/i ); | ||||||||||||||||||||||||||||
| 219 | |||||||||||||||||||||||||||||
| 220 | # ERS - BayStack Numbered | ||||||||||||||||||||||||||||
| 221 | 3 | ▶ | return 'Nortel::Baystack' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 222 | if $desc =~ /^(BayStack|Ethernet\s+Routing\s+Switch)\s[2345](\d){2,3}/i; | ||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||
| 224 | # BPS | ||||||||||||||||||||||||||||
| 225 | 3 | ▶ | return 'Nortel::Baystack' if $desc =~ /Business\sPolicy\sSwitch/i; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||
| 227 | # Nortel AP 222X | ||||||||||||||||||||||||||||
| 228 | 3 | ▶ | return 'Nortel::AP222x' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 229 | if ( $desc =~ /Access\s+Point\s+222/ ); | ||||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||||
| 231 | #------------------------------------------------------------------# | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | # Allied Telesis Layer2 managed switches. | ||||||||||||||||||||||||||||
| 234 | 3 | ▶ | return 'Allied' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 235 | if ( $desc =~ /Allied.*AT-80\d{2}\S*/i ); | ||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | 3 | ▶ | return 'Allied' if ( $desc =~ /allied/i ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||
| 239 | # Aruba wireless switches | ||||||||||||||||||||||||||||
| 240 | 3 | ▶ | return 'Aruba' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 241 | if ( $desc =~ /(ArubaOS|AirOS)/ ); | ||||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||||
| 243 | # Alcatel-Lucent branded Aruba | ||||||||||||||||||||||||||||
| 244 | 3 | ▶ | return 'Aruba' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 245 | if ( $desc =~ /^AOS-W/ ); | ||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | 3 | ▶ | return 'Asante' if ( $desc =~ /asante/i ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||
| 249 | # Bay Hub | ||||||||||||||||||||||||||||
| 250 | 3 | ▶ | return 'Bayhub' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 251 | if ( $desc =~ /\bNMM.*Agent/ ); | ||||||||||||||||||||||||||||
| 252 | 3 | ▶ | return 'Bayhub' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 253 | if ( $desc =~ /\bBay\s*Stack.*Hub/i ); | ||||||||||||||||||||||||||||
| 254 | |||||||||||||||||||||||||||||
| 255 | # Centillion ATM | ||||||||||||||||||||||||||||
| 256 | 3 | ▶ | return 'Centillion' if ( $desc =~ /MCP/ ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||||
| 258 | # IBM BladeCenter 4-Port GB Ethernet Switch Module | ||||||||||||||||||||||||||||
| 259 | 3 | ▶ | return 'Dell' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 260 | if ( $desc =~ /^IBM Gigabit Ethernet Switch Module$/ ); | ||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||
| 262 | # Linksys 2024/2048 | ||||||||||||||||||||||||||||
| 263 | 3 | ▶ | return 'Dell' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 264 | if ( $desc | ||||||||||||||||||||||||||||
| 265 | =~ /^(24|48)-Port 10\/100\/1000 Gigabit Switch (with |w\/)WebView$/ ); | ||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||
| 267 | # Foundry | ||||||||||||||||||||||||||||
| 268 | 3 | ▶ | return 'Foundry' if $desc =~ /foundry/i; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 269 | |||||||||||||||||||||||||||||
| 270 | # Kentrox DataSMART DSU/CSU | ||||||||||||||||||||||||||||
| 271 | 3 | ▶ | return 'Kentrox' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 272 | if ( $desc =~ /^DataSMART/i ); | ||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||
| 274 | # Orinoco | ||||||||||||||||||||||||||||
| 275 | 3 | ▶ | return 'Orinoco' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 276 | if ( $desc =~ /(AP-\d{3}|WavePOINT)/ ); | ||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||
| 278 | # Synoptics Hub | ||||||||||||||||||||||||||||
| 279 | 3 | ▶ | return 'S3000' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 280 | if ( $desc =~ /\bNMM\s+(281|3000|3030)/i ); | ||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||
| 282 | # SonicWALL | ||||||||||||||||||||||||||||
| 283 | 3 | ▶ | return 'SonicWALL' if $desc =~ /SonicWALL/i; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||
| 285 | # Avaya Secure Router | ||||||||||||||||||||||||||||
| 286 | 3 | ▶ | return 'Tasman' | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 287 | if ( $desc =~ /^(avaya|nortel)\s+(SR|secure\srouter)\s+\d{4}/i ); | ||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||
| 290 | 2 | 1; | |||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||
| 292 | __END__ | ||||||||||||||||||||||||||||