amend previous commit (update install.php as well)
[racktables] / wwwroot / inc / snmp.php
CommitLineData
2ffd5a2a
DO
1<?php
2
cddbb9fd
DO
3# This file is a part of RackTables, a datacenter and server room management
4# framework. See accompanying file "COPYING" for the full copyright and
5# licensing information.
6
536e7323 7global $iftable_processors;
74aee2dc 8$iftable_processors = array();
6be06cbb 9
d7d68b9b
AD
10$iftable_processors['generic-e-any-100TX'] = array
11(
12 'pattern' => '@^e(\d+)$@',
13 'replacement' => 'e\\1',
14 'dict_key' => 19,
15 'label' => '\\1',
16 'try_next_proc' => FALSE,
17);
18
b0021c43
AD
19$iftable_processors['generic-fa-any-100TX'] = array
20(
21 'pattern' => '@^fa(\d+)$@',
22 'replacement' => 'fa\\1',
23 'dict_key' => 19,
869d4ff4 24 'label' => '\\1',
b0021c43
AD
25 'try_next_proc' => FALSE,
26);
27
8595dfd0
AD
28$iftable_processors['generic-g45-to-g48-combo-1000SFP'] = array
29(
30 'pattern' => '@^g(45|46|47|48)$@',
31 'replacement' => 'g\\1',
32 'dict_key' => '4-1077',
33 'label' => 'g\\1',
34 'try_next_proc' => TRUE,
35);
36
37$iftable_processors['generic-g-any-1000T'] = array
38(
39 'pattern' => '@^g(\d+)$@',
40 'replacement' => 'g\\1',
41 'dict_key' => 24,
73c5d377 42 'label' => '\\1',
8595dfd0
AD
43 'try_next_proc' => FALSE,
44);
45
d7d68b9b
AD
46$iftable_processors['generic-g-1-to-2-1000T'] = array
47(
48 'pattern' => '@^g(1|2)$@',
49 'replacement' => 'g\\1',
50 'dict_key' => 24,
51 'label' => 'G\\1',
52 'try_next_proc' => TRUE,
53);
54
55$iftable_processors['generic-g-3-to-4-combo-1000SFP'] = array
56(
57 'pattern' => '@^g(3|4)$@',
58 'replacement' => 'g\\1',
59 'dict_key' => '4-1077',
60 'label' => 'G\\1',
61 'try_next_proc' => TRUE,
62);
63
64$iftable_processors['generic-g-3-to-4-combo-1000T'] = array
65(
66 'pattern' => '@^g(3|4)$@',
67 'replacement' => 'g\\1',
68 'dict_key' => '1-24',
69 'label' => 'G\\1',
70 'try_next_proc' => TRUE,
71);
72
40b1e115
AD
73$iftable_processors['generic-gi-any-1000T'] = array
74(
75 'pattern' => '@^gi(\d+)$@',
76 'replacement' => 'gi\\1',
77 'dict_key' => 24,
73c5d377 78 'label' => '\\1',
40b1e115
AD
79 'try_next_proc' => FALSE,
80);
81
b0021c43
AD
82$iftable_processors['generic-gi-1-to-2-1000T'] = array
83(
84 'pattern' => '@^gi(\d+)$@',
85 'replacement' => 'gi\\1',
86 'dict_key' => 24,
73c5d377 87 'label' => 'G\\1',
b0021c43
AD
88 'try_next_proc' => FALSE,
89);
90
91$iftable_processors['generic-gi-3-to-4-combo-1000SFP'] = array
92(
93 'pattern' => '@^gi(3|4)$@',
94 'replacement' => 'gi\\1',
95 'dict_key' => '4-1077',
73c5d377 96 'label' => 'G\\1',
b0021c43
AD
97 'try_next_proc' => TRUE,
98);
99
100$iftable_processors['generic-gi-3-to-4-combo-1000T'] = array
101(
102 'pattern' => '@^gi(3|4)$@',
103 'replacement' => 'gi\\1',
104 'dict_key' => '1-24',
73c5d377 105 'label' => 'G\\1',
40b1e115
AD
106 'try_next_proc' => FALSE,
107);
108
109$iftable_processors['generic-gi-9-to-10-combo-1000SFP'] = array
110(
111 'pattern' => '@^gi(9|10)$@',
112 'replacement' => 'gi\\1',
113 'dict_key' => '4-1077',
73c5d377 114 'label' => 'G\\1',
40b1e115
AD
115 'try_next_proc' => TRUE,
116);
117
118$iftable_processors['generic-gi-9-to-10-combo-1000T'] = array
119(
120 'pattern' => '@^gi(9|10)$@',
121 'replacement' => 'gi\\1',
122 'dict_key' => '1-24',
73c5d377 123 'label' => 'G\\1',
40b1e115
AD
124 'try_next_proc' => FALSE,
125);
126
127$iftable_processors['generic-gi-51-to-52-combo-1000SFP'] = array
128(
129 'pattern' => '@^gi(51|52)$@',
130 'replacement' => 'gi\\1',
131 'dict_key' => '4-1077',
73c5d377 132 'label' => 'G\\1',
40b1e115
AD
133 'try_next_proc' => TRUE,
134);
135
136$iftable_processors['generic-gi-51-to-52-combo-1000T'] = array
137(
138 'pattern' => '@^gi(51|52)$@',
139 'replacement' => 'gi\\1',
140 'dict_key' => '1-24',
73c5d377 141 'label' => 'G\\1',
b0021c43
AD
142 'try_next_proc' => FALSE,
143);
144
78cfe89b
AD
145$iftable_processors['generic-port-any-1000T'] = array
146(
147 'pattern' => '@^port([[:digit:]]+)$@',
148 'replacement' => '\\1',
149 'dict_key' => 24,
150 'label' => '\\1',
151 'try_next_proc' => FALSE,
152);
153
47a523af
AD
154$iftable_processors['catalyst-any-100TX'] = array
155(
156 'pattern' => '@^FastEthernet(\d+)$@',
157 'replacement' => 'fa\\1',
158 'dict_key' => 19,
159 'label' => 'fa\\1',
160 'try_next_proc' => FALSE,
161);
162
163$iftable_processors['catalyst-any-1000T'] = array
164(
165 'pattern' => '@^GigabitEthernet(\d+)$@',
166 'replacement' => 'gi\\1',
167 'dict_key' => 24,
168 'label' => 'gi\\1',
169 'try_next_proc' => FALSE,
170);
171
bc8b21f0
AD
172$iftable_processors['catalyst-9-to-12-1000SFP'] = array
173(
174 'pattern' => '@^GigabitEthernet(9|10|11|12)$@',
175 'replacement' => 'gi\\1',
176 'dict_key' => '4-1077',
177 'label' => 'gi\\1',
178 'try_next_proc' => TRUE,
179);
180
181$iftable_processors['catalyst-9-to-12-1000T'] = array
182(
183 'pattern' => '@^GigabitEthernet(9|10|11|12)$@',
184 'replacement' => 'gi\\1',
185 'dict_key' => 24,
186 'label' => 'gi\\1',
187 'try_next_proc' => FALSE,
188);
189
cbc30061 190$iftable_processors['catalyst-chassis-mgmt'] = array
6be06cbb 191(
cbc30061
DO
192 'pattern' => '@^FastEthernet([[:digit:]])$@',
193 'replacement' => 'fa\\1',
194 'dict_key' => '1-19',
6be06cbb
DO
195 'label' => 'mgmt',
196 'try_next_proc' => FALSE,
197);
198
38bd461c
AA
199$iftable_processors['catalyst-chassis-25-to-26-1000SFP'] = array
200(
201 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(25|26)$@',
202 'replacement' => 'gi\\1\\2',
203 'dict_key' => '4-1077',
204 'label' => '\\2X',
205 'try_next_proc' => FALSE,
206);
207
6be06cbb 208$iftable_processors['catalyst-chassis-any-100TX'] = array
74aee2dc 209(
6be06cbb
DO
210 'pattern' => '@^FastEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
211 'replacement' => 'fa\\1\\2',
74aee2dc 212 'dict_key' => 19,
6be06cbb 213 'label' => '\\2X',
56a797ef
DO
214 'try_next_proc' => FALSE,
215);
216
6be06cbb 217$iftable_processors['catalyst-chassis-25-to-26-100FX/MT-RJ'] = array
56a797ef 218(
6be06cbb
DO
219 'pattern' => '@^FastEthernet([[:digit:]]+/)?(25|26)$@',
220 'replacement' => 'fa\\1\\2',
8920f7f5 221 'dict_key' => 1195,
6be06cbb
DO
222 'label' => '\\2',
223 'try_next_proc' => FALSE,
224);
225
226$iftable_processors['catalyst-chassis-any-1000T'] = array
227(
f0255d01 228 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
6be06cbb
DO
229 'replacement' => 'gi\\1\\2',
230 'dict_key' => 24,
231 'label' => '\\2X',
56a797ef 232 'try_next_proc' => FALSE,
74aee2dc
DO
233);
234
6be06cbb 235$iftable_processors['catalyst-chassis-uplinks-1000T'] = array
74aee2dc 236(
6be06cbb
DO
237 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
238 'replacement' => 'gi\\1\\2',
74aee2dc 239 'dict_key' => 24,
6be06cbb 240 'label' => '\\2',
56a797ef
DO
241 'try_next_proc' => FALSE,
242);
243
8a4bee49
DO
244$iftable_processors['catalyst-chassis-uplinks-1000SX'] = array
245(
246 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
247 'replacement' => 'gi\\1\\2',
248 'dict_key' => '1-1202', // Gig-SX hardwired
249 'label' => '\\2',
250 'try_next_proc' => FALSE,
251);
252
6be06cbb 253$iftable_processors['catalyst-chassis-any-1000SFP'] = array
74aee2dc 254(
6be06cbb
DO
255 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
256 'replacement' => 'gi\\1\\2',
8536e20a 257 'dict_key' => '4-1077',
6be06cbb 258 'label' => '\\2',
56a797ef
DO
259 'try_next_proc' => FALSE,
260);
261
6be06cbb 262$iftable_processors['catalyst-chassis-any-1000GBIC'] = array
56a797ef 263(
6be06cbb
DO
264 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
265 'replacement' => 'gi\\1\\2',
8536e20a 266 'dict_key' => '3-1078',
6be06cbb 267 'label' => '\\2',
56a797ef
DO
268 'try_next_proc' => FALSE,
269);
270
7e87a291
DO
271$iftable_processors['catalyst-chassis-1-to-2-combo-1000SFP'] = array
272(
273 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(1|2)$@',
274 'replacement' => 'gi\\1\\2',
275 'dict_key' => '4-1077',
276 'label' => '\\2',
277 'try_next_proc' => TRUE,
278);
279
712010be
AA
280$iftable_processors['catalyst-chassis-1-to-2-1000SFP'] = array
281(
282 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(1|2)$@',
283 'replacement' => 'gi\\1\\2',
284 'dict_key' => '4-1077',
285 'label' => '\\2',
286 'try_next_proc' => FALSE,
287);
288
a048e8fc
DO
289$iftable_processors['catalyst-chassis-8-combo-1000SFP'] = array
290(
291 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(8)$@',
292 'replacement' => 'gi\\1\\2',
293 'dict_key' => '4-1077',
294 'label' => '\\2',
295 'try_next_proc' => TRUE,
296);
297
6be06cbb 298$iftable_processors['catalyst-chassis-21-to-24-combo-1000SFP'] = array
56a797ef 299(
6be06cbb
DO
300 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(21|22|23|24)$@',
301 'replacement' => 'gi\\1\\2',
8536e20a 302 'dict_key' => '4-1077',
6be06cbb 303 'label' => '\\2',
56a797ef
DO
304 'try_next_proc' => TRUE,
305);
306
6be06cbb 307$iftable_processors['catalyst-chassis-45-to-48-combo-1000SFP'] = array
56a797ef 308(
6be06cbb
DO
309 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(45|46|47|48)$@',
310 'replacement' => 'gi\\1\\2',
8536e20a 311 'dict_key' => '4-1077',
6be06cbb 312 'label' => '\\2',
56a797ef
DO
313 'try_next_proc' => TRUE,
314);
315
6be06cbb 316$iftable_processors['catalyst-chassis-uplinks-10000X2'] = array
56a797ef 317(
6be06cbb
DO
318 'pattern' => '@^TenGigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
319 'replacement' => 'te\\1\\2',
8536e20a 320 'dict_key' => '6-1080',
6be06cbb 321 'label' => '\\2',
56a797ef 322 'try_next_proc' => FALSE,
74aee2dc
DO
323);
324
b475f795
DO
325$iftable_processors['catalyst-chassis-uplinks-10000SFP+'] = array
326(
327 'pattern' => '@^TenGigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
328 'replacement' => 'te\\1\\2',
329 'dict_key' => '9-1084',
330 'label' => '\\2',
331 'try_next_proc' => FALSE,
332);
333
6be06cbb 334$iftable_processors['catalyst-chassis-25-to-28-1000SFP'] = array
74aee2dc 335(
6be06cbb
DO
336 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(25|26|27|28)$@',
337 'replacement' => 'gi\\1\\2',
8536e20a 338 'dict_key' => '4-1077',
6be06cbb 339 'label' => '\\2',
56a797ef 340 'try_next_proc' => FALSE,
74aee2dc
DO
341);
342
6be06cbb 343$iftable_processors['catalyst-chassis-49-to-52-1000SFP'] = array
74aee2dc 344(
6be06cbb
DO
345 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(49|50|51|52)$@',
346 'replacement' => 'gi\\1\\2',
8536e20a 347 'dict_key' => '4-1077',
6be06cbb 348 'label' => '\\2',
56a797ef 349 'try_next_proc' => FALSE,
74aee2dc
DO
350);
351
71d6b313 352$iftable_processors['catalyst-blade-13-to-16-1000SFP'] = array
74aee2dc 353(
6be06cbb
DO
354 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(13|14|15|16)$@',
355 'replacement' => 'gi\\1\\2',
8536e20a 356 'dict_key' => '4-1077',
6be06cbb 357 'label' => '\\2',
56a797ef 358 'try_next_proc' => FALSE,
74aee2dc
DO
359);
360
71d6b313 361$iftable_processors['catalyst-blade-21-to-24-1000SFP'] = array
74aee2dc 362(
6be06cbb
DO
363 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(21|22|23|24)$@',
364 'replacement' => 'gi\\1\\2',
8536e20a 365 'dict_key' => '4-1077',
6be06cbb 366 'label' => '\\2',
56a797ef 367 'try_next_proc' => FALSE,
74aee2dc
DO
368);
369
71d6b313
DO
370$iftable_processors['catalyst-blade-11-to-12-1000T'] = array
371(
372 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(11|12)$@',
373 'replacement' => 'gi\\1\\2',
374 'dict_key' => '1-24',
375 'label' => '\\2',
376 'try_next_proc' => FALSE,
377);
378
379$iftable_processors['catalyst-blade-17-to-20-1000T'] = array
380(
381 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(17|18|19|20)$@',
382 'replacement' => 'gi\\1\\2',
383 'dict_key' => '1-24',
384 'label' => '\\2',
385 'try_next_proc' => FALSE,
386);
387
388$iftable_processors['catalyst-blade-any-bp/1000T'] = array
389(
390 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?([[:digit:]]+)$@',
391 'replacement' => 'gi\\1\\2',
392 'dict_key' => '1-1087',
393 'label' => '',
394 'try_next_proc' => FALSE,
395);
396
86d614c3
DO
397$iftable_processors['catalyst-11-to-12-1000T'] = array
398(
399 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(11|12)$@',
400 'replacement' => 'gi\\1\\2',
401 'dict_key' => '1-24',
402 'label' => '\\2',
403 'try_next_proc' => FALSE,
404);
405
7e87a291
DO
406$iftable_processors['catalyst-1-to-10-1000T'] = array
407(
408 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(1|2|3|4|5|6|7|8|9|10)$@',
409 'replacement' => 'gi\\1\\2',
410 'dict_key' => '1-24',
411 'label' => '\\2',
412 'try_next_proc' => FALSE,
413);
414
415$iftable_processors['catalyst-11-to-12-GBIC'] = array
416(
417 'pattern' => '@^GigabitEthernet([[:digit:]]+/)?(11|12)$@',
418 'replacement' => 'gi\\1\\2',
419 'dict_key' => '3-1078',
420 'label' => '\\2',
421 'try_next_proc' => FALSE,
422);
423
38c9bb20
DO
424$iftable_processors['catalyst-stack-any-1000T'] = array
425(
426 'pattern' => '@^GigabitEthernet(\d+)/(\d+)/(\d+)$@',
427 'replacement' => 'gi\\1/\\2/\\3',
428 'dict_key' => '1-24',
429 'label' => 'unit \\1 port \\3',
430 'try_next_proc' => FALSE,
431);
432
433$iftable_processors['catalyst-stack-25-to-28-SFP'] = array
434(
435 'pattern' => '@^GigabitEthernet(\d+)/(\d+)/(25|26|27|28)$@',
436 'replacement' => 'gi\\1/\\2/\\3',
437 'dict_key' => '4-1077',
438 'label' => 'unit \\1 port \\3',
439 'try_next_proc' => FALSE,
440);
441
65e11216
AD
442$iftable_processors['catalyst-2948-49-to-50-SFP'] = array
443(
444 'pattern' => '@^port 2/(49|50)$@',
445 'replacement' => 'gi\\1',
446 'dict_key' => '4-1077',
447 'label' => '\\1',
448 'try_next_proc' => FALSE,
449);
450
451$iftable_processors['catalyst-2948-any-100TX'] = array
452(
453 'pattern' => '@^port 2/(\d+)$@',
454 'replacement' => 'fa\\1',
455 'dict_key' => 19,
456 'label' => '\\1',
457 'try_next_proc' => FALSE,
458);
459
74aee2dc
DO
460$iftable_processors['nexus-any-10000SFP+'] = array
461(
56a797ef 462 'pattern' => '@^Ethernet([[:digit:]]/[[:digit:]]+)$@',
74aee2dc 463 'replacement' => 'e\\1',
8536e20a 464 'dict_key' => '9-1084',
56a797ef
DO
465 'label' => '\\1',
466 'try_next_proc' => FALSE,
74aee2dc
DO
467);
468
8acd246d
DO
469$iftable_processors['ftos-any-1000T'] = array
470(
471 'pattern' => '@^GigabitEthernet 0/(\d+)$@',
472 'replacement' => 'gi0/\\1',
473 'dict_key' => '1-24',
474 'label' => '\\1',
475 'try_next_proc' => FALSE,
476);
477
478$iftable_processors['ftos-44-to-47-1000SFP'] = array
479(
480 'pattern' => '@^GigabitEthernet 0/(44|45|46|47)$@',
481 'replacement' => 'gi0/\\1',
482 'dict_key' => '4-1077',
483 'label' => '\\1',
484 'try_next_proc' => FALSE,
485);
486
487$iftable_processors['ftos-any-10000SFP+'] = array
488(
489 'pattern' => '@^TenGigabitEthernet 0/(\d+)$@',
490 'replacement' => 'te0/\\1',
491 'dict_key' => '9-1084',
492 'label' => '\\1',
493 'try_next_proc' => FALSE,
494);
495
1e5a92d8
DO
496$iftable_processors['ftos-any-QSFP+'] = array
497(
498 'pattern' => '@^fortyGigE 0/(\d+)$@',
499 'replacement' => 'fo0/\\1',
500 'dict_key' => '10-1588',
501 'label' => '\\1',
502 'try_next_proc' => FALSE,
503);
504
505$iftable_processors['ftos-mgmt'] = array
506(
507 'pattern' => '@^ManagementEthernet 0/0$@',
508 'replacement' => 'ma0/0',
509 'dict_key' => '1-19',
510 'label' => 'ethernet',
511 'try_next_proc' => FALSE,
512);
513
e7662d90
DO
514$iftable_processors['nexus-mgmt'] = array
515(
516 'pattern' => '@^(mgmt[[:digit:]]+)$@',
517 'replacement' => '\\1',
518 'dict_key' => '1-24',
519 'label' => '\\1',
520 'try_next_proc' => FALSE,
521);
522
56a797ef 523$iftable_processors['procurve-chassis-100TX'] = array
74aee2dc 524(
56a797ef 525 'pattern' => '@^([[:digit:]]+)$@',
74aee2dc
DO
526 'replacement' => '\\1',
527 'dict_key' => 19,
56a797ef
DO
528 'label' => '\\1',
529 'try_next_proc' => FALSE,
530);
531
532$iftable_processors['procurve-chassis-1000T'] = array
533(
534 'pattern' => '@^([[:digit:]]+)$@',
535 'replacement' => '\\1',
536 'dict_key' => 24,
537 'label' => '\\1',
538 'try_next_proc' => FALSE,
539);
540
4b43f713
DO
541$iftable_processors['procurve-45-to-48-combo-1000SFP'] = array
542(
543 'pattern' => '@^(45|46|47|48)$@',
544 'replacement' => '\\1',
545 'dict_key' => '4-1077',
546 'label' => '\\1',
547 'try_next_proc' => TRUE,
548);
549
13b28c20
DO
550$iftable_processors['procurve-21-to-24-combo-1000SFP'] = array
551(
552 'pattern' => '@^(21|22|23|24)$@',
553 'replacement' => '\\1',
554 'dict_key' => '4-1077',
555 'label' => '\\1',
556 'try_next_proc' => TRUE,
557);
558
93c0a7b9
DO
559$iftable_processors['procurve-23-to-24-combo-1000SFP'] = array
560(
561 'pattern' => '@^(23|24)$@',
562 'replacement' => '\\1',
563 'dict_key' => '4-1077',
564 'label' => '\\1',
565 'try_next_proc' => TRUE,
566);
567
56a797ef
DO
568$iftable_processors['procurve-modular-100TX'] = array
569(
570 'pattern' => '@^([A-Z][[:digit:]]+)$@',
571 'replacement' => '\\1',
572 'dict_key' => 19,
573 'label' => '\\1',
574 'try_next_proc' => FALSE,
74aee2dc
DO
575);
576
4bbb87a3
AD
577$iftable_processors['procurve-modular-1000T'] = array
578(
579 'pattern' => '@^([A-Z][[:digit:]]+)$@',
580 'replacement' => '\\1',
581 'dict_key' => 24,
582 'label' => '\\1',
583 'try_next_proc' => FALSE,
584);
585
74aee2dc
DO
586$iftable_processors['procurve-25-to-26-1000T'] = array
587(
56a797ef 588 'pattern' => '@^(25|26)$@',
74aee2dc
DO
589 'replacement' => '\\1',
590 'dict_key' => 24,
56a797ef
DO
591 'label' => '\\1',
592 'try_next_proc' => FALSE,
74aee2dc
DO
593);
594
83aedacd
AD
595$iftable_processors['procurve-27-to-28-1000SFP'] = array
596(
597 'pattern' => '@^(27|28)$@',
598 'replacement' => '\\1',
599 'dict_key' => '4-1077',
600 'label' => '\\1',
601 'try_next_proc' => FALSE,
602);
603
74aee2dc
DO
604$iftable_processors['procurve-49-to-50-1000T'] = array
605(
56a797ef 606 'pattern' => '@^(49|50)$@',
74aee2dc
DO
607 'replacement' => '\\1',
608 'dict_key' => 24,
56a797ef
DO
609 'label' => '\\1',
610 'try_next_proc' => FALSE,
74aee2dc
DO
611);
612
13b28c20
DO
613$iftable_processors['procurve-51-to-52-1000SFP'] = array
614(
615 'pattern' => '@^(51|52)$@',
616 'replacement' => '\\1',
617 'dict_key' => '4-1077',
618 'label' => '\\1',
619 'try_next_proc' => FALSE,
620);
621
5d930daf
AD
622$iftable_processors['procurve-49-to-52-10000SFP+'] = array
623(
624 'pattern' => '@^(49|50|51|52)$@',
625 'replacement' => '\\1',
626 'dict_key' => '9-1084',
627 'label' => '\\1',
628 'try_next_proc' => FALSE,
629);
630
4a2358b3
DO
631$iftable_processors['gbe2csfp-1-to-16'] = array
632(
633 'pattern' => '@^Downlink(\d+)$@',
634 'replacement' => '\\0',
635 'dict_key' => '1-1603',
636 'label' => '\\1',
637 'try_next_proc' => FALSE,
638);
639
640$iftable_processors['gbe2csfp-17'] = array
641(
642 'pattern' => '@^Xconnect1$@',
643 'replacement' => '\\0',
644 'dict_key' => '1-1603',
645 'label' => '17',
646 'try_next_proc' => FALSE,
647);
648
649$iftable_processors['gbe2csfp-18'] = array
650(
651 'pattern' => '@^Xconnect2$@',
652 'replacement' => '\\0',
653 'dict_key' => '1-1603',
654 'label' => '18',
655 'try_next_proc' => FALSE,
656);
657
658$iftable_processors['gbe2csfp-19'] = array
659(
660 'pattern' => '@^Mgmt$@',
661 'replacement' => '\\0',
662 'dict_key' => '1-1604',
663 'label' => '19',
664 'try_next_proc' => FALSE,
665);
666
667$iftable_processors['gbe2csfp-20'] = array
668(
669 'pattern' => '@^Uplink1$@',
670 'replacement' => '\\0',
671 'dict_key' => '1-24',
672 'label' => '20',
673 'try_next_proc' => FALSE,
674);
675
676$iftable_processors['gbe2csfp-21sfp'] = array
677(
678 'pattern' => '@^Uplink2$@',
679 'replacement' => '\\0',
680 'dict_key' => '4-1077',
681 'label' => '21',
682 'try_next_proc' => TRUE,
683);
684
685$iftable_processors['gbe2csfp-21'] = array
686(
687 'pattern' => '@^Uplink2$@',
688 'replacement' => '\\0',
689 'dict_key' => '1-24',
690 'label' => '21',
691 'try_next_proc' => FALSE,
692);
693
694$iftable_processors['gbe2csfp-22sfp'] = array
695(
696 'pattern' => '@^Uplink3$@',
697 'replacement' => '\\0',
698 'dict_key' => '4-1077',
699 'label' => '22',
700 'try_next_proc' => TRUE,
701);
702
703$iftable_processors['gbe2csfp-22'] = array
704(
705 'pattern' => '@^Uplink3$@',
706 'replacement' => '\\0',
707 'dict_key' => '1-24',
708 'label' => '22',
709 'try_next_proc' => FALSE,
710);
711
712$iftable_processors['gbe2csfp-23sfp'] = array
713(
714 'pattern' => '@^Uplink4$@',
715 'replacement' => '\\0',
716 'dict_key' => '4-1077',
717 'label' => '23',
718 'try_next_proc' => TRUE,
719);
720
721$iftable_processors['gbe2csfp-23'] = array
722(
723 'pattern' => '@^Uplink4$@',
724 'replacement' => '\\0',
725 'dict_key' => '1-24',
726 'label' => '23',
727 'try_next_proc' => FALSE,
728);
729
730$iftable_processors['gbe2csfp-24sfp'] = array
731(
732 'pattern' => '@^Uplink5$@',
733 'replacement' => '\\0',
734 'dict_key' => '4-1077',
735 'label' => '24',
736 'try_next_proc' => TRUE,
737);
738
739$iftable_processors['gbe2csfp-24'] = array
740(
741 'pattern' => '@^Uplink5$@',
742 'replacement' => '\\0',
743 'dict_key' => '1-24',
744 'label' => '24',
745 'try_next_proc' => FALSE,
746);
747
6be06cbb 748$iftable_processors['netgear-chassis-any-1000T'] = array
74aee2dc 749(
32fae2ee
DO
750 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (\d+) Gigabit - Level$@',
751 'replacement' => '\\1/\\2/\\3',
56a797ef 752 'dict_key' => 24,
32fae2ee 753 'label' => '\\3',
56a797ef
DO
754 'try_next_proc' => FALSE,
755);
756
e326551d
AD
757$iftable_processors['netgear-chassis-any-1000SFP'] = array
758(
759 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (\d+) Gigabit - Level$@',
760 'replacement' => '\\1/\\2/\\3',
761 'dict_key' => '4-1077',
762 'label' => '\\3',
763 'try_next_proc' => FALSE,
764);
765
6be06cbb
DO
766$iftable_processors['netgear-chassis-21-to-24-1000Tcombo'] = array
767(
32fae2ee
DO
768 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (21|22|23|24) Gigabit - Level$@',
769 'replacement' => '\\1/\\2/\\3',
6be06cbb 770 'dict_key' => 24,
32fae2ee 771 'label' => '\\3T',
6be06cbb
DO
772 'try_next_proc' => FALSE,
773);
774
775$iftable_processors['netgear-chassis-21-to-24-1000SFP'] = array
776(
32fae2ee
DO
777 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (21|22|23|24) Gigabit - Level$@',
778 'replacement' => '\\1/\\2/\\3',
8536e20a 779 'dict_key' => '4-1077',
32fae2ee 780 'label' => '\\3F',
6be06cbb
DO
781 'try_next_proc' => TRUE,
782);
783
0d456a22
DO
784$iftable_processors['netgear-chassis-45-to-48-1000SFPcombo'] = array
785(
786 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (45|46|47|48) Gigabit - Level$@',
787 'replacement' => '\\1/\\2/\\3',
788 'dict_key' => '4-1077',
789 'label' => '\\3F',
790 'try_next_proc' => TRUE,
791);
792
3e8ad42f
DO
793$iftable_processors['netgear-chassis-any-1000SFPcombo'] = array
794(
32fae2ee
DO
795 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (\d+) Gigabit - Level$@',
796 'replacement' => '\\1/\\2/\\3',
3e8ad42f 797 'dict_key' => '4-1077',
32fae2ee 798 'label' => '\\3F',
3e8ad42f
DO
799 'try_next_proc' => TRUE,
800);
801
fc807353
DO
802$iftable_processors['netgear-chassis-any-100TX'] = array
803(
32fae2ee
DO
804 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (\d+) 10/100 Copper - Level$@',
805 'replacement' => '\\1/\\2/\\3',
fc807353 806 'dict_key' => 19,
32fae2ee 807 'label' => '\\3',
fc807353
DO
808 'try_next_proc' => FALSE,
809);
810
0d456a22
DO
811$iftable_processors['netgear-chassis-any-SFP+'] = array
812(
813 'pattern' => '@^Unit: (\d+) Slot: (\d+) Port: (\d+) 10G - Level$@',
814 'replacement' => '\\1/\\2/\\3',
815 'dict_key' => '9-1084',
816 'label' => '\\3',
817 'try_next_proc' => FALSE,
818);
819
ac02ab69
AD
820$iftable_processors['netgear-49-to-50-combo-1000SFP'] = array
821(
822 'pattern' => '@^GbE_(49|50)$@',
823 'replacement' => '\\1',
824 'dict_key' => '4-1077',
825 'label' => '\\1F',
826 'try_next_proc' => TRUE,
827);
828
829$iftable_processors['netgear-49-to-50-combo-1000T'] = array
830(
831 'pattern' => '@^GbE_(49|50)$@',
832 'replacement' => '\\1',
833 'dict_key' => '1-24',
834 'label' => '\\1T',
835 'try_next_proc' => FALSE,
836);
837
838$iftable_processors['netgear-any-100TX'] = array
839(
840 'pattern' => '@^FE_(\d+)$@',
841 'replacement' => '\\1',
842 'dict_key' => 19,
843 'label' => '\\1',
844 'try_next_proc' => FALSE,
845);
846
56a797ef
DO
847$iftable_processors['nortel-any-1000T'] = array
848(
849 'pattern' => '@^Ethernet Port on unit 1, port ([[:digit:]]+)$@',
74aee2dc
DO
850 'replacement' => '\\1',
851 'dict_key' => 24,
56a797ef
DO
852 'label' => '\\1',
853 'try_next_proc' => FALSE,
74aee2dc
DO
854);
855
fb3e70de
DO
856$iftable_processors['smc-combo-45-to-48'] = array
857(
858 'pattern' => '@^Ethernet Port on unit 1, port (45|46|47|48)$@',
859 'replacement' => '\\1',
860 'dict_key' => '4-1077',
861 'label' => '\\1',
862 'try_next_proc' => TRUE,
863);
864
13b28c20
DO
865$iftable_processors['smc2-combo-21-to-24'] = array
866(
867 'pattern' => '@^Port #(21|22|23|24)$@',
868 'replacement' => '\\1',
869 'dict_key' => '4-1077',
870 'label' => '\\1',
871 'try_next_proc' => TRUE,
872);
873
874$iftable_processors['smc2-combo-23-to-24'] = array
875(
876 'pattern' => '@^Port #(23|24)$@',
877 'replacement' => '\\1',
878 'dict_key' => '4-1077',
879 'label' => '\\1',
880 'try_next_proc' => TRUE,
881);
882
883$iftable_processors['smc2-combo-25-to-28'] = array
884(
885 'pattern' => '@^Port #(25|26|27|28)$@',
886 'replacement' => '\\1',
887 'dict_key' => '4-1077',
888 'label' => '\\1',
889 'try_next_proc' => TRUE,
890);
891
892$iftable_processors['smc2-1000T-25-to-28'] = array
893(
894 'pattern' => '@^Port #(25|26|27|28)$@',
895 'replacement' => '\\1',
896 'dict_key' => '1-24',
897 'label' => '\\1',
898 'try_next_proc' => FALSE,
899);
900
901$iftable_processors['smc2-any-1000T'] = array
902(
903 'pattern' => '@^Port #(\d+)$@',
904 'replacement' => '\\1',
905 'dict_key' => '1-24',
906 'label' => '\\1',
907 'try_next_proc' => FALSE,
908);
909
910$iftable_processors['smc2-any-100TX'] = array
911(
912 'pattern' => '@^Port #(\d+)$@',
913 'replacement' => '\\1',
914 'dict_key' => '1-19',
915 'label' => '\\1',
916 'try_next_proc' => FALSE,
917);
918
91389980
DO
919$iftable_processors['juniper-DPCE-R-4XGE-XFP'] = array
920(
7d69a266
DO
921 'pattern' => '@^xe-([[:digit:]]+)/([[:digit:]]+/[[:digit:]]+)$@',
922 'replacement' => '\\0',
91389980 923 'dict_key' => '8-1082', // XFP/empty
7d69a266
DO
924 'label' => 'slot \\1 port \\2',
925 'try_next_proc' => FALSE,
926);
927
1f54e1ba
DO
928$iftable_processors['juniper-ex-pic0-1000T'] = array
929(
930 'pattern' => '@^ge-([[:digit:]]+)/0/([[:digit:]]+)$@',
931 'replacement' => '\\0',
932 'dict_key' => '1-24',
933 'label' => 'unit \\1 port \\2',
934 'try_next_proc' => FALSE,
935);
936
937$iftable_processors['juniper-ex-mgmt'] = array
938(
939 'pattern' => '/^me0$/',
940 'replacement' => 'me0',
941 'dict_key' => '1-24',
942 'label' => 'MGMT',
943 'try_next_proc' => FALSE,
944);
945
7d69a266
DO
946$iftable_processors['quidway-21-to-24-comboT'] = array
947(
948 'pattern' => '@^GigabitEthernet([[:digit:]]+/[[:digit:]]+/)(21|22|23|24)$@',
949 'replacement' => 'gi\\1\\2',
950 'dict_key' => '1-24',
951 'label' => '\\2',
952 'try_next_proc' => TRUE,
953);
954
24c3e444
DO
955$iftable_processors['quidway-21-to-24-comboSFP'] = array
956(
957 'pattern' => '@^GigabitEthernet([[:digit:]]+/[[:digit:]]+/)(21|22|23|24)$@',
958 'replacement' => 'gi\\1\\2',
959 'dict_key' => '4-1077',
960 'label' => '\\2',
961 'try_next_proc' => TRUE,
962);
963
b55f8de3
DO
964$iftable_processors['quidway-slot1-SFP'] = array
965(
966 'pattern' => '@^GigabitEthernet0/1/([[:digit:]]+)$@',
967 'replacement' => 'gi0/1/\\1',
968 'dict_key' => '4-1077',
969 'label' => 'SFP\\1',
970 'try_next_proc' => FALSE,
971);
972
4d6aad51
DO
973$iftable_processors['quidway-any-100TX'] = array
974(
975 'pattern' => '@^Ethernet([[:digit:]]+/[[:digit:]]+/)([[:digit:]]+)$@',
976 'replacement' => 'e\\1\\2',
977 'dict_key' => '1-19',
978 'label' => '\\2',
979 'try_next_proc' => FALSE,
980);
981
7d69a266
DO
982$iftable_processors['quidway-any-1000SFP'] = array
983(
984 'pattern' => '@^GigabitEthernet([[:digit:]]+/[[:digit:]]+/)([[:digit:]]+)$@',
985 'replacement' => 'gi\\1\\2',
986 'dict_key' => '4-1077', // empty SFP-1000
987 'label' => '\\2',
988 'try_next_proc' => FALSE,
989);
990
24c3e444
DO
991$iftable_processors['quidway-any-1000T'] = array
992(
993 'pattern' => '@^GigabitEthernet([[:digit:]]+/[[:digit:]]+/)([[:digit:]]+)$@',
994 'replacement' => 'gi\\1\\2',
995 'dict_key' => '1-24',
996 'label' => '\\2',
997 'try_next_proc' => FALSE,
998);
999
7d69a266
DO
1000$iftable_processors['quidway-XFP'] = array
1001(
1002 'pattern' => '@^XGigabitEthernet([[:digit:]]+/[[:digit:]]+/)([[:digit:]]+)$@',
1003 'replacement' => 'xg\\1\\2',
1004 'dict_key' => '8-1082',
1005 'label' => '\\2',
1006 'try_next_proc' => FALSE,
1007);
1008
1009$iftable_processors['quidway-mgmt'] = array
1010(
1011 'pattern' => '@^MEth([[:digit:]]+/[[:digit:]]+/)([[:digit:]]+)$@',
1012 'replacement' => 'me\\1\\2',
1013 'dict_key' => '1-19',
1014 'label' => 'eth',
91389980
DO
1015 'try_next_proc' => FALSE,
1016);
1017
661b3fdb
DO
1018$iftable_processors['fgs-1-to-4-comboSFP'] = array
1019(
1020 # only 4 first copper ports of 1st unit of a stack
1021 'pattern' => '@^GigabitEthernet1/1/(1|2|3|4)$@',
1022 'replacement' => 'e1/1/\\1',
1023 'dict_key' => '4-1077',
1024 'label' => '\\1F',
1025 'try_next_proc' => TRUE,
1026);
1027
1028$iftable_processors['fgs-any-1000T'] = array
1029(
6c32c3ff
AA
1030 'pattern' => '@^GigabitEthernet(0|1)/1/([[:digit:]]+)$@',
1031 'replacement' => 'e\\1/1/\\2',
661b3fdb 1032 'dict_key' => '1-24',
6c32c3ff
AA
1033 'label' => '\\2',
1034 'try_next_proc' => FALSE,
1035);
1036
1037$iftable_processors['fls624-combo'] = array
1038(
1039 'pattern' => '@^GigabitEthernet0/1/(21|22|23|24)$@',
1040 'replacement' => 'e0/1/\\1',
1041 'dict_key' => '4-1077',
661b3fdb 1042 'label' => '\\1',
6c32c3ff
AA
1043 'try_next_proc' => TRUE,
1044);
1045
1046$iftable_processors['fls648-combo'] = array
1047(
1048 'pattern' => '@^GigabitEthernet0/1/(45|46|47|48)$@',
1049 'replacement' => 'e0/1/\\1',
1050 'dict_key' => '4-1077',
1051 'label' => '\\1',
1052 'try_next_proc' => TRUE,
1053);
1054
1055# These can be CX4, but that is not handled here.
1056$iftable_processors['fls-uplinks'] = array
1057(
1058 'pattern' => '@^10GigabitEthernet0/([234])/1$@',
1059 'replacement' => 'e0/\\1/1',
1060 'dict_key' => '8-1082',
1061 'label' => 'Slot \\1',
661b3fdb
DO
1062 'try_next_proc' => FALSE,
1063);
1064
1065$iftable_processors['fgs-uplinks'] = array
1066(
1067 'pattern' => '@^10GigabitEthernet1/2/([[:digit:]]+)$@',
1068 'replacement' => 'e1/2/\\1',
1069 'dict_key' => '8-1082', // default is XFP, but may be overridden to CX4
1070 'label' => 'Slot2 \\1',
1071 'try_next_proc' => FALSE,
1072);
1073
ec523868
DO
1074$iftable_processors['fcx-uplinks'] = array
1075(
1076 'pattern' => '@^10GigabitEthernet1/2/([[:digit:]]+)$@',
1077 'replacement' => 'e1/2/\\1',
1078 'dict_key' => '9-1084',
1079 'label' => 'X\\1',
1080 'try_next_proc' => FALSE,
1081);
1082
1083$iftable_processors['fcx-management'] = array
1084(
1085 'pattern' => '@^Management$@',
1086 'replacement' => 'management1',
1087 'dict_key' => '1-24',
1088 'label' => 'Management',
1089 'try_next_proc' => FALSE,
1090);
1091
4eeadb79
DO
1092$iftable_processors['summit-25-to-26-XFP-uplinks'] = array
1093(
1094 'pattern' => '@^.+ Port (25|26)$@',
1095 'replacement' => '\\1',
1096 'dict_key' => '8-1082',
1097 'label' => '\\1',
1098 'try_next_proc' => FALSE,
1099);
1100
dbcf1931
DO
1101$iftable_processors['summit-27-to-30-XFP-uplinks'] = array
1102(
1103 'pattern' => '@^.+ Port (27|28|29|30)$@',
1104 'replacement' => '\\1',
1105 'dict_key' => '8-1082',
1106 'label' => '\\1',
1107 'try_next_proc' => FALSE,
1108);
1109
4eeadb79
DO
1110$iftable_processors['summit-21-to-24-comboSFP'] = array
1111(
1112 'pattern' => '@^.+ Port (21|22|23|24)$@',
1113 'replacement' => '\\1',
1114 'dict_key' => '4-1077',
1115 'label' => '\\1',
1116 'try_next_proc' => TRUE,
1117);
1118
dbcf1931
DO
1119$iftable_processors['summit-13-to-24-comboT'] = array
1120(
1121 'pattern' => '@^.+ Port (1[3456789]|2[01234])$@',
1122 'replacement' => '\\1',
1123 'dict_key' => '1-24',
1124 'label' => '\\1',
1125 'try_next_proc' => TRUE,
1126);
1127
4eeadb79
DO
1128$iftable_processors['summit-any-1000T'] = array
1129(
1130 'pattern' => '@^.+ Port ([[:digit:]]+)$@',
1131 'replacement' => '\\1',
1132 'dict_key' => '1-24',
1133 'label' => '\\1',
1134 'try_next_proc' => FALSE,
1135);
1136
dbcf1931
DO
1137$iftable_processors['summit-any-SFP'] = array
1138(
1139 'pattern' => '@^.+ Port ([[:digit:]]+)$@',
1140 'replacement' => '\\1',
1141 'dict_key' => '4-1077',
1142 'label' => '\\1',
1143 'try_next_proc' => FALSE,
1144);
1145
4eeadb79
DO
1146$iftable_processors['summit-management'] = array
1147(
1148 'pattern' => '@^Management Port$@',
1149 'replacement' => 'mgmt',
1150 'dict_key' => '1-19',
21d38e6b 1151 'label' => 'management',
4eeadb79
DO
1152 'try_next_proc' => FALSE,
1153);
1154
13b28c20
DO
1155$iftable_processors['C3KX-NM-10000'] = array
1156(
1157 'pattern' => '@^TenGigabitEthernet1/(\d+)$@',
1158 'replacement' => 'te1/\\1',
1159 'dict_key' => '9-1084',
1160 'label' => 'NM TE\\1',
1161 'try_next_proc' => FALSE,
1162);
1163
1164$iftable_processors['C3KX-NM-1000'] = array
1165(
1166 'pattern' => '@^GigabitEthernet1/(\d+)$@',
1167 'replacement' => 'gi1/\\1',
1168 'dict_key' => '4-1077',
1169 'label' => 'NM G\\1',
1170 'try_next_proc' => FALSE,
1171);
1172
2ea5fd28
DO
1173$iftable_processors['arista-any-1000T'] = array
1174(
1175 'pattern' => '@^Ethernet([[:digit:]]+)$@',
1176 'replacement' => 'e\\1',
1177 'dict_key' => '1-24',
1178 'label' => '\\1',
1179 'try_next_proc' => FALSE,
1180);
1181
1182$iftable_processors['arista-49-to-52-SFP+'] = array
1183(
1184 'pattern' => '@^Ethernet(49|50|51|52)$@',
1185 'replacement' => 'e\\1',
1186 'dict_key' => '9-1084',
1187 'label' => '\\1',
1188 'try_next_proc' => FALSE,
1189);
1190
fe8f91c0 1191$iftable_processors['arista-any-SFP+'] = array
06a03a99 1192(
92df4b0e 1193 'pattern' => '@^Ethernet([[:digit:]]+)$@',
1b3176ac 1194 'replacement' => 'e\\1',
92df4b0e
AD
1195 'dict_key' => '9-1084',
1196 'label' => '\\1',
1197 'try_next_proc' => FALSE,
06a03a99
AD
1198);
1199
1200$iftable_processors['arista-management'] = array
1201(
92df4b0e 1202 'pattern' => '@^Management(1|2)$@',
2ea5fd28 1203 'replacement' => 'ma\\1',
92df4b0e 1204 'dict_key' => '1-24',
2ea5fd28 1205 'label' => '<--->',
92df4b0e
AD
1206 'try_next_proc' => FALSE,
1207);
1208
1209$iftable_processors['dell-33xx-any-combo-1000SFP'] = array
1210(
1211 'pattern' => '@^1/g(\d+)$@',
1212 'replacement' => 'g\\1',
1213 'dict_key' => '4-1077',
d7d68b9b 1214 'label' => '\\1',
92df4b0e
AD
1215 'try_next_proc' => TRUE,
1216);
1217
1218$iftable_processors['dell-33xx-any-1000T'] = array
1219(
1220 'pattern' => '@^1/g(\d+)$@',
1221 'replacement' => 'g\\1',
1222 'dict_key' => '1-24',
d7d68b9b 1223 'label' => '\\1',
92df4b0e
AD
1224 'try_next_proc' => FALSE,
1225);
1226
8595dfd0
AD
1227$iftable_processors['dell-33xx-any-100TX'] = array
1228(
1229 'pattern' => '@^1/e(\d+)$@',
1230 'replacement' => 'e\\1',
1231 'dict_key' => 19,
d7d68b9b 1232 'label' => '\\1',
8595dfd0
AD
1233 'try_next_proc' => FALSE,
1234);
1235
1ce6a44d
AD
1236$iftable_processors['dell-5224-21-to-24-combo-1000SFP'] = array
1237(
1238 'pattern' => '@^EtherNet Port on unit 1, port:(21|22|23|24)$@',
1239 'replacement' => 'g\\1',
1240 'dict_key' => '4-1077',
d7d68b9b 1241 'label' => '\\1',
1ce6a44d
AD
1242 'try_next_proc' => TRUE,
1243);
1244
1245$iftable_processors['dell-52xx-any-1000T'] = array
1246(
1247 'pattern' => '@^EtherNet Port on unit 1, port:(\d+)$@',
1248 'replacement' => 'g\\1',
1249 'dict_key' => 24,
d7d68b9b 1250 'label' => '\\1',
1ce6a44d
AD
1251 'try_next_proc' => FALSE,
1252);
1253
92df4b0e
AD
1254$iftable_processors['dell-g1-to-g2-1000SFP'] = array
1255(
1256 'pattern' => '@^g(1|2)$@',
1257 'replacement' => 'g\\1',
1258 'dict_key' => '4-1077',
d7d68b9b 1259 'label' => '\\1',
92df4b0e
AD
1260 'try_next_proc' => FALSE,
1261);
1262
1263$iftable_processors['dell-g3-to-g4-1000T'] = array
1264(
1265 'pattern' => '@^g(3|4)$@',
1266 'replacement' => 'g\\1',
1267 'dict_key' => '1-24',
d7d68b9b 1268 'label' => '\\1',
92df4b0e
AD
1269 'try_next_proc' => FALSE,
1270);
1271
1b10e7cf
AD
1272$iftable_processors['dell-g17-to-g24-combo-1000T'] = array
1273(
1274 'pattern' => '@^g(17|18|19|20|21|22|23|24)$@',
1275 'replacement' => 'g\\1',
1276 'dict_key' => '1-24',
d7d68b9b 1277 'label' => '\\1',
92df4b0e
AD
1278 'try_next_proc' => TRUE,
1279);
1280
8595dfd0 1281$iftable_processors['dell-g21-to-g24-combo-1000SFP'] = array
92df4b0e
AD
1282(
1283 'pattern' => '@^g(21|22|23|24)$@',
1284 'replacement' => 'g\\1',
92df4b0e 1285 'dict_key' => '4-1077',
d7d68b9b 1286 'label' => '\\1',
92df4b0e
AD
1287 'try_next_proc' => TRUE,
1288);
1289
1b10e7cf
AD
1290$iftable_processors['dell-any-1000SFP'] = array
1291(
1292 'pattern' => '@^g(\d+)$@',
1293 'replacement' => 'g\\1',
1294 'dict_key' => '4-1077',
d7d68b9b 1295 'label' => '\\1',
1b10e7cf
AD
1296 'try_next_proc' => FALSE,
1297);
1298
1cd6eca3
AD
1299$iftable_processors['3com-49-to-52-1000SFP'] = array
1300(
1301 'pattern' => '@^GigabitEthernet(\d+)/(\d+)/(49|50|51|52)$@',
1302 'replacement' => '\\1/\\2/\\3',
1303 'dict_key' => '4-1077',
1304 'label' => '\\3',
1305 'try_next_proc' => FALSE,
1306);
1307
1308$iftable_processors['3com-any-1000T'] = array
1309(
1310 'pattern' => '@^GigabitEthernet(\d+)/(\d+)/(\d+)$@',
1311 'replacement' => '\\1/\\2/\\3',
1312 'dict_key' => 24,
1313 'label' => '\\3',
1314 'try_next_proc' => FALSE,
1315);
1316
c4acc30b
AD
1317$iftable_processors['tplink-21-to-24-combo-1000SFP'] = array
1318(
1319 'pattern' => '@^.+ Port on unit .+ port (21|22|23|24)$@',
1320 'replacement' => 'g\\1',
1321 'dict_key' => '4-1077',
1322 'label' => '\\1',
1323 'try_next_proc' => TRUE,
1324);
1325
1326$iftable_processors['tplink-any-1000T'] = array
1327(
1328 'pattern' => '@^.+ Port on unit .+ port ([[:digit:]]+)$@',
1329 'replacement' => 'g\\1',
1330 'dict_key' => 24,
1331 'label' => '\\1',
1332 'try_next_proc' => FALSE,
1333);
1334
f60a9008
AD
1335$iftable_processors['motorola-rfs-any-1000T'] = array
1336(
1337 'pattern' => '@^ge(\d+)$@',
1338 'replacement' => 'ge\\1',
1339 'dict_key' => '1-24',
1340 'label' => '\\1',
1341 'try_next_proc' => FALSE,
1342);
1343
1344$iftable_processors['motorola-rfs-uplink-comboSFP'] = array
1345(
1346 'pattern' => '@^up(\d+)$@',
1347 'replacement' => 'up\\1',
1348 'dict_key' => '4-1077',
1349 'label' => 'uplink',
1350 'try_next_proc' => TRUE,
1351);
1352
1353$iftable_processors['motorola-rfs-uplink-comboT'] = array
1354(
1355 'pattern' => '@^up(\d+)$@',
1356 'replacement' => 'up\\1',
1357 'dict_key' => '1-24',
1358 'label' => 'uplink',
1359 'try_next_proc' => FALSE,
1360);
1361
49055269
AD
1362$iftable_processors['dlink-21-to-24-comboSFP'] = array
1363(
1364 'pattern' => '@^Slot0/(21|22|23|24)$@',
1365 'replacement' => '\\1F',
1366 'dict_key' => '4-1077',
1367 'label' => '\\1F',
1368 'try_next_proc' => TRUE,
1369);
1370
1371$iftable_processors['dlink-21-to-24-comboT'] = array
1372(
1373 'pattern' => '@^Slot0/(21|22|23|24)$@',
1374 'replacement' => '\\1T',
1375 'dict_key' => '1-24',
1376 'label' => '\\1T',
1377 'try_next_proc' => FALSE,
1378);
1379
1380$iftable_processors['dlink-any-1000T'] = array
1381(
1382 'pattern' => '@^Slot0/(\d+)$@',
1383 'replacement' => '\\1',
1384 'dict_key' => '1-24',
1385 'label' => '\\1',
1386 'try_next_proc' => FALSE,
1387);
1388
a3520e4c
DO
1389$iftable_processors['nec-mgmt'] = array
1390(
1391 'pattern' => '@^MGMT0$@',
1392 'replacement' => 'mgmt 0', # note the space
1393 'dict_key' => '1-24',
1394 'label' => 'MNG',
1395 'try_next_proc' => FALSE,
1396);
1397
1398$iftable_processors['nec-any-1000T'] = array
1399(
1400 'pattern' => '@^GigabitEther 0/(\d+)$@',
1401 'replacement' => 'gi 0/\\1', # note the space
1402 'dict_key' => '1-24',
1403 'label' => '\\1',
1404 'try_next_proc' => FALSE,
1405);
1406
1407$iftable_processors['nec-any-SFP+'] = array
1408(
1409 'pattern' => '@^TenGigabitEther 0/(\d+)$@',
1410 'replacement' => 'te 0/\\1', # note the space
1411 'dict_key' => '9-1084',
1412 'label' => '\\1',
1413 'try_next_proc' => FALSE,
1414);
1415
ecc982a6
DO
1416$iftable_processors['ibm-mgmt'] = array
1417(
1418 'pattern' => '@^Management1$@',
1419 'replacement' => 'mgmt',
1420 'dict_key' => '1-24',
1421 'label' => 'Mgmt',
1422 'try_next_proc' => FALSE,
1423);
1424
24ae7cd1
DO
1425$iftable_processors['ibm-any-1000T'] = array
1426(
1427 'pattern' => '@^Ethernet(\d+)$@',
1428 'replacement' => 'port \\1',
1429 'dict_key' => '1-24',
1430 'label' => '\\1',
1431 'try_next_proc' => FALSE,
1432);
1433
1434$iftable_processors['ibm-49-to-52-SFP+'] = array
1435(
1436 'pattern' => '@^Ethernet(49|50|51|52)$@',
1437 'replacement' => 'port \\1',
1438 'dict_key' => '9-1084',
1439 'label' => '\\1',
1440 'try_next_proc' => FALSE,
1441);
1442
ecc982a6
DO
1443$iftable_processors['ibm-any-SFP+'] = array
1444(
1445 'pattern' => '@^Ethernet(\d+)$@',
1446 'replacement' => 'port \\1',
1447 'dict_key' => '9-1084',
1448 'label' => '\\1',
1449 'try_next_proc' => FALSE,
1450);
1451
536e7323 1452global $known_switches;
74aee2dc
DO
1453$known_switches = array // key is system OID w/o "enterprises" prefix
1454(
feee5e5a
DO
1455 '9.1.217' => array
1456 (
1457 'dict_key' => 124,
1458 'text' => 'WS-C2924-XL: 24 RJ-45/10-100TX',
1459 'processors' => array ('catalyst-chassis-any-100TX'),
10e81331
AD
1460 ),
1461 '9.1.220' => array
1462 (
1463 'dict_key' => 1719,
1464 'text' => 'WS-C2924M-XL: 24 RJ-45/10-100TX',
1465 'processors' => array ('catalyst-chassis-any-100TX'),
feee5e5a 1466 ),
462e65ac
DO
1467 '9.1.246' => array
1468 (
1469 'dict_key' => 391,
1470 'text' => 'WS-C3508G-XL: 8 GBIC/1000',
1471 'processors' => array ('catalyst-chassis-any-1000GBIC'),
1472 ),
d7466acb
DO
1473 '9.1.248' => array
1474 (
1475 'dict_key' => 393,
1476 'text' => 'WS-C3524-XL: 24 RJ-45/10-100TX + 2 GBIC/1000',
1477 'processors' => array ('catalyst-chassis-any-1000GBIC', 'catalyst-chassis-any-100TX'),
1478 ),
cfd07952
DO
1479 '9.1.278' => array
1480 (
1481 'dict_key' => 395,
1482 'text' => 'WS-C3548-XL: 48 RJ-45/10-100TX + 2 GBIC/1000',
1483 'processors' => array ('catalyst-chassis-any-1000GBIC', 'catalyst-chassis-any-100TX'),
1484 ),
74aee2dc
DO
1485 '9.1.324' => array
1486 (
1487 'dict_key' => 380,
1488 'text' => 'WS-C2950-24: 24 RJ-45/10-100TX',
6be06cbb 1489 'processors' => array ('catalyst-chassis-any-100TX'),
74aee2dc
DO
1490 ),
1491 '9.1.325' => array
1492 (
1493 'dict_key' => 382,
1494 'text' => 'WS-C2950C-24: 24 RJ-45/10-100TX + 2 MT-RJ/100FX fiber',
6be06cbb 1495 'processors' => array ('catalyst-chassis-25-to-26-100FX/MT-RJ', 'catalyst-chassis-any-100TX'),
74aee2dc 1496 ),
a3432267
DO
1497 '9.1.359' => array
1498 (
1499 'dict_key' => 386,
1500 'text' => 'WS-C2950T-24: 24 RJ-45/10-100TX + 2 1000T uplinks',
1501 'processors' => array ('catalyst-chassis-uplinks-1000T', 'catalyst-chassis-any-100TX'),
1502 ),
8fe7aefe
AD
1503 '9.1.366' => array
1504 (
1505 'dict_key' => 400,
1506 'text' => 'WS-C3550-24: 24 RJ-45/10-100TX + 2 GBIC/1000',
1507 'processors' => array ('catalyst-chassis-any-1000GBIC', 'catalyst-chassis-any-100TX'),
1508 ),
13b28c20
DO
1509 '9.1.559' => array
1510 (
1511 'dict_key' => 387,
1512 'text' => 'WS-C2950T-48: 48 RJ-45/10-100TX + 2 1000T uplinks',
1513 'processors' => array ('catalyst-chassis-uplinks-1000T', 'catalyst-chassis-any-100TX'),
1514 ),
e41fafef
AD
1515 '9.1.694' => array
1516 (
1517 'dict_key' => 1710,
1518 'text' => 'WS-C2960-24TC-L: 24 RJ-45/10-100TX + 2 combo-gig',
1519 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-1000T', 'catalyst-chassis-any-100TX'),
1520 ),
7e87a291
DO
1521 '9.1.695' => array
1522 (
2b512043 1523 'dict_key' => 1590,
7e87a291
DO
1524 'text' => 'WS-C2960-48TC-L: 48 RJ-45/10-100TX + 2 combo-gig',
1525 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-1000T', 'catalyst-chassis-any-100TX'),
1526 ),
e8ea3f02
AD
1527 '9.1.930' => array
1528 (
aca86e3f 1529 'dict_key' => 1607,
e8ea3f02
AD
1530 'text' => 'WS-C3560E-12D-S: 12 X2/10000 w/TwinGig + OOBM',
1531 'processors' => array
1532 (
1533 'catalyst-chassis-any-1000SFP',
1534 'catalyst-chassis-uplinks-10000X2',
1535 'catalyst-chassis-mgmt',
1536 ),
1537 ),
da273595
AD
1538 '9.1.956' => array
1539 (
1540 'dict_key' => 1721,
1541 'text' => 'WS-C3560E-12SD: 12 SFP/1000 +2 X2/10000 + OOBM',
1542 'processors' => array
1543 (
1544 'catalyst-chassis-any-1000SFP',
1545 'catalyst-chassis-uplinks-10000X2',
1546 'catalyst-chassis-mgmt',
1547 ),
1548 ),
13b28c20
DO
1549 '9.1.793' => array
1550 (
1551 'dict_key' => 1575,
1552 'text' => 'WS-C3560E-24TD: 24 RJ-45/10-100-1000T(X) + 2 X2/10000 w/TwinGig + OOBM',
1553 'processors' => array
1554 (
1555 'catalyst-chassis-25-to-28-1000SFP', // TwinGig
1556 'catalyst-chassis-any-1000T',
1557 'catalyst-chassis-uplinks-10000X2',
1558 'catalyst-chassis-mgmt',
1559 ),
1560 ),
1561 '9.1.794' => array
1562 (
1563 'dict_key' => 1574,
1564 'text' => 'WS-C3560E-48TD: 48 RJ-45/10-100-1000T(X) + 2 X2/10000 w/TwinGig + OOBM',
1565 'processors' => array
1566 (
1567 'catalyst-chassis-49-to-52-1000SFP', // TwinGig
1568 'catalyst-chassis-any-1000T',
1569 'catalyst-chassis-uplinks-10000X2',
1570 'catalyst-chassis-mgmt',
1571 ),
1572 ),
38bd461c
AA
1573 '9.1.1257' => array
1574 (
de4a82d2 1575 'dict_key' => 1391,
38bd461c
AA
1576 'text' => 'WS-C2960G-24TS-S: 24 RJ-45/10-100-1000T(X)',
1577 'processors' => array ('catalyst-chassis-25-to-26-1000SFP', 'catalyst-chassis-mgmt', 'catalyst-chassis-any-1000T'),
1578 ),
a048e8fc
DO
1579 '9.1.799' => array
1580 (
1581 'dict_key' => 168,
1582 'text' => 'WS-C2960G-8TC-L: 7 RJ-45/10-100-1000T(X) + 1 combo-gig',
1583 'processors' => array ('catalyst-chassis-8-combo-1000SFP', 'catalyst-chassis-any-1000T'),
1584 ),
74aee2dc
DO
1585 '9.1.696' => array
1586 (
1587 'dict_key' => 167,
1588 'text' => 'WS-C2960G-24TC-L: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
6be06cbb 1589 'processors' => array ('catalyst-chassis-21-to-24-combo-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1590 ),
1591 '9.1.697' => array
1592 (
1593 'dict_key' => 166,
1594 'text' => 'WS-C2960G-48TC-L: 44 RJ-45/10-100-1000T(X) + 4 combo-gig',
6be06cbb 1595 'processors' => array ('catalyst-chassis-45-to-48-combo-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc 1596 ),
38bd461c
AA
1597 '9.1.928' => array
1598 (
de4a82d2 1599 'dict_key' => 1894,
38bd461c
AA
1600 'text' => 'WS-C2960-24TC-S: 24 RJ-45/10-100TX + 2 combo-gig',
1601 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-100TX'),
1602 ),
74aee2dc
DO
1603 '9.1.716' => array
1604 (
1605 'dict_key' => 164,
1606 'text' => 'WS-C2960-24TT-L: 24 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
6be06cbb 1607 'processors' => array ('catalyst-chassis-any-100TX', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1608 ),
1609 '9.1.717' => array
1610 (
13b28c20 1611 'dict_key' => 1572,
74aee2dc 1612 'text' => 'WS-C2960-48TT-L: 48 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
6be06cbb 1613 'processors' => array ('catalyst-chassis-any-100TX', 'catalyst-chassis-any-1000T'),
74aee2dc 1614 ),
47a523af
AD
1615 '9.1.724' => array
1616 (
1617 'dict_key' => 160,
1618 'text' => 'WS-CE500-24TT: 24 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
1619 'processors' => array ('catalyst-any-100TX', 'catalyst-any-1000T'),
1620 ),
bc8b21f0
AD
1621 '9.1.727' => array
1622 (
1623 'dict_key' => 161,
1624 'text' => 'WS-CE500G-12TC: 8 RJ-45/10-100/1000T(X) + 4 combo',
1625 'processors' => array ('catalyst-9-to-12-1000SFP', 'catalyst-9-to-12-1000T', 'catalyst-any-1000T'),
1626 ),
ec523868
DO
1627 '9.1.950' => array
1628 (
1629 'dict_key' => 1347,
8a6a7c3c
AA
1630 'text' => 'WS-C2960-24PC-L: 24 RJ-45/10-100TX + 2 combo-gig',
1631 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-1000T', 'catalyst-chassis-any-100TX'),
1632 ),
1633 '9.1.1147' => array
1634 (
de4a82d2 1635 'dict_key' => 1897,
8a6a7c3c 1636 'text' => 'WS-C2960-24PC-S: 24 RJ-45/10-100TX + 2 combo-gig',
ec523868
DO
1637 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-1000T', 'catalyst-chassis-any-100TX'),
1638 ),
4d043be1
AA
1639 '9.1.927' => array
1640 (
1641 'dict_key' => 140,
2b512043
DO
1642 'text' => 'WS-C2960-48TC-S: 48 RJ-45/10-100TX + 2 combo-gig',
1643 'processors' => array ('catalyst-chassis-1-to-2-combo-1000SFP', 'catalyst-chassis-any-1000T', 'catalyst-chassis-any-100TX'),
4d043be1 1644 ),
13b28c20
DO
1645 '9.1.1005' => array
1646 (
1647 'dict_key' => 1573,
1648 'text' => 'WS-C2960-48TT-S: 48 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
1649 'processors' => array ('catalyst-chassis-any-100TX', 'catalyst-chassis-any-1000T'),
1650 ),
74aee2dc
DO
1651 '9.1.527' => array
1652 (
1653 'dict_key' => 210,
1654 'text' => 'WS-C2970G-24T: 24 RJ-45/10-100-1000T(X)',
6be06cbb 1655 'processors' => array ('catalyst-chassis-any-1000T'),
74aee2dc
DO
1656 ),
1657 '9.1.561' => array
1658 (
1659 'dict_key' => 115,
1660 'text' => 'WS-C2970G-24TS: 24 RJ-45/10-100-1000T(X) + 4 SFP/1000',
6be06cbb 1661 'processors' => array ('catalyst-chassis-25-to-28-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1662 ),
1663 '9.1.633' => array
1664 (
1665 'dict_key' => 169,
1666 'text' => 'WS-C3560-24TS: 24 RJ-45/10-100TX + 2 SFP/1000',
6be06cbb 1667 'processors' => array ('catalyst-chassis-any-1000SFP', 'catalyst-chassis-any-100TX'),
74aee2dc
DO
1668 ),
1669 '9.1.634' => array
1670 (
1671 'dict_key' => 170,
1672 'text' => 'WS-C3560-48TS: 48 RJ-45/10-100TX + 4 SFP/1000',
6be06cbb 1673 'processors' => array ('catalyst-chassis-any-1000SFP', 'catalyst-chassis-any-100TX'),
74aee2dc
DO
1674 ),
1675 '9.1.563' => array
1676 (
1677 'dict_key' => 171,
1678 'text' => 'WS-C3560-24PS: 24 RJ-45/10-100TX + 2 SFP/1000',
6be06cbb 1679 'processors' => array ('catalyst-chassis-any-1000SFP', 'catalyst-chassis-any-100TX'),
74aee2dc
DO
1680 ),
1681 '9.1.564' => array
1682 (
1683 'dict_key' => 172,
1684 'text' => 'WS-C3560-48PS: 48 RJ-45/10-100TX + 4 SFP/1000',
6be06cbb 1685 'processors' => array ('catalyst-chassis-any-1000SFP', 'catalyst-chassis-any-100TX'),
74aee2dc 1686 ),
7774b149
AA
1687 '9.1.1025' => array
1688 (
1689 'dict_key' => 1807,
1690 'text' => 'WS-C3560V2-48PS: 48 RJ-45/10-100TX + 4 SFP/1000',
1691 'processors' => array ('catalyst-chassis-any-1000SFP', 'catalyst-chassis-any-100TX'),
1692 ),
74aee2dc
DO
1693 '9.1.614' => array
1694 (
1695 'dict_key' => 175,
1696 'text' => 'WS-C3560G-24PS: 24 RJ-45/10-100-1000T(X) + 4 SFP/1000',
6be06cbb 1697 'processors' => array ('catalyst-chassis-25-to-28-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1698 ),
1699 '9.1.615' => array
1700 (
1701 'dict_key' => 173,
1702 'text' => 'WS-C3560G-24TS: 24 RJ-45/10-100-1000T(X) + 4 SFP/1000',
6be06cbb 1703 'processors' => array ('catalyst-chassis-25-to-28-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1704 ),
1705 '9.1.616' => array
1706 (
1707 'dict_key' => 176,
1708 'text' => 'WS-C3560G-48PS: 48 RJ-45/10-100-1000T(X) + 4 SFP/1000',
6be06cbb 1709 'processors' => array ('catalyst-chassis-49-to-52-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1710 ),
1711 '9.1.617' => array
1712 (
1713 'dict_key' => 174,
1714 'text' => 'WS-C3560G-48TS: 48 RJ-45/10-100-1000T(X) + 4 SFP/1000',
6be06cbb 1715 'processors' => array ('catalyst-chassis-49-to-52-1000SFP', 'catalyst-chassis-any-1000T'),
74aee2dc
DO
1716 ),
1717 '9.1.626' => array
1718 (
1719 'dict_key' => 147,
56a797ef 1720 'text' => 'WS-C4948: 48 RJ-45/10-100-1000T(X) + 4 SFP/1000 + 1 RJ-45/100TX (OOB mgmt)',
cbc30061 1721 'processors' => array ('catalyst-chassis-49-to-52-1000SFP', 'catalyst-chassis-uplinks-1000T', 'catalyst-chassis-mgmt'),
74aee2dc
DO
1722 ),
1723 '9.1.659' => array
1724 (
1725 'dict_key' => 377,
56a797ef 1726 'text' => 'WS-C4948-10GE: 48 RJ-45/10-100-1000T(X) + 2 X2/10000 + 1 RJ-45/100TX (OOB mgmt)',
cbc30061 1727 'processors' => array ('catalyst-chassis-uplinks-10000X2', 'catalyst-chassis-uplinks-1000T', 'catalyst-chassis-mgmt'),
74aee2dc
DO
1728 ),
1729 '9.1.428' => array
1730 (
1731 'dict_key' => 389,
1732 'text' => 'WS-C2950G-24: 24 RJ-45/10-100TX + 2 GBIC/1000',
6be06cbb 1733 'processors' => array ('catalyst-chassis-any-1000GBIC', 'catalyst-chassis-any-100TX'),
74aee2dc
DO
1734 ),
1735 '9.1.429' => array
1736 (
1737 'dict_key' => 390,
1738 'text' => 'WS-C2950G-48: 48 RJ-45/10-100TX + 2 GBIC/1000',
6be06cbb 1739 'processors' => array ('catalyst-chassis-any-1000GBIC', 'catalyst-chassis-any-100TX'),
74aee2dc 1740 ),
b3f84e8e
AD
1741 '9.1.471' => array
1742 (
1743 'dict_key' => 270,
1744 'text' => '2651XM: 2 RJ-45/10-100TX',
1745 'processors' => array ('catalyst-chassis-any-100TX'),
1746 ),
74aee2dc
DO
1747 '9.1.559' => array
1748 (
1749 'dict_key' => 387,
1750 'text' => 'WS-C2950T-48: 48 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
6be06cbb 1751 'processors' => array ('catalyst-chassis-uplinks-1000T', 'catalyst-chassis-any-100TX'),
74aee2dc 1752 ),
8a4bee49
DO
1753 '9.1.560' => array
1754 (
1755 'dict_key' => 384,
1756 'text' => 'WS-C2950SX-48: 48 RJ-45/10-100TX + 2 1000Base-SX',
1757 'processors' => array ('catalyst-chassis-uplinks-1000SX', 'catalyst-chassis-any-100TX'),
1758 ),
74aee2dc
DO
1759 '9.1.749' => array
1760 (
1761 'dict_key' => 989,
1762 'text' => 'WS-CBS3030-DEL: 10 internal/10-100-1000T(X) + 2 RJ-45/10-100-1000T(X) + 4 SFP/1000',
71d6b313 1763 'processors' => array ('catalyst-blade-11-to-12-1000T', 'catalyst-blade-13-to-16-1000SFP', 'catalyst-blade-any-bp/1000T'),
74aee2dc
DO
1764 ),
1765 '9.1.920' => array
1766 (
1767 'dict_key' => 795,
1768 'text' => 'WS-CBS3032-DEL: 16 internal/10-100-1000T(X) + 4 RJ-45/10-100-1000T(X) + 4 SFP/1000',
71d6b313 1769 'processors' => array ('catalyst-blade-17-to-20-1000T', 'catalyst-blade-21-to-24-1000SFP', 'catalyst-blade-any-bp/1000T'),
74aee2dc 1770 ),
2217e284
DO
1771 '9.1.367' => array
1772 (
1773 'dict_key' => 404,
1774 'text' => 'WS-C3550-48: 48 RJ-45/10-100TX + 2 GBIC/1000',
1775 'processors' => array ('catalyst-chassis-any-100TX', 'catalyst-chassis-any-1000GBIC'),
1776 ),
7e87a291
DO
1777 '9.1.368' => array
1778 (
1779 'dict_key' => 398,
1780 'text' => 'WS-C3550-12T: 10 RJ-45/10-100-1000T(X) + 2 GBIC/1000',
1781 'processors' => array ('catalyst-1-to-10-1000T', 'catalyst-11-to-12-GBIC'),
1782 ),
86d614c3
DO
1783 '9.1.431' => array
1784 (
1785 'dict_key' => 399,
1786 'text' => 'WS-C3550-12G: 10 GBIC/1000 + 2 RJ-45/10-100-1000T(X)',
1787 'processors' => array ('catalyst-11-to-12-1000T', 'catalyst-chassis-any-1000GBIC'),
1788 ),
a9bd9e98
DO
1789 '9.1.282' => array
1790 (
1791 'dict_key' => 154,
1792 'text' => 'WS-C6506: modular device (INCOMPLETE!)',
1793 'processors' => array ('catalyst-chassis-any-1000T'),
1794 ),
65b4b21a
DO
1795 '9.1.1104' => array
1796 (
1797 'dict_key' => 1348,
1798 'text' => 'WS-C2350-48TD: 48 RJ-45/10-100-1000T(X) + 2 X2/10000 w/TwinGig option',
1799 'processors' => array
1800 (
1801 'catalyst-chassis-49-to-52-1000SFP', // TwinGig actually
1802 'catalyst-chassis-any-1000T',
1803 'catalyst-chassis-uplinks-10000X2',
1804 'catalyst-chassis-mgmt',
1805 ),
1806 ),
712010be
AA
1807 '9.1.1016' => array
1808 (
1809 'dict_key' => 1370,
1810 'text' => 'WS-C2960-48PST-L: 48 RJ-45/10-100TX PoE + 2 SFP/1000 + 2 RJ-45/10-100-1000T(X)',
1811 'processors' => array
1812 (
1813 'catalyst-chassis-any-100TX',
1814 'catalyst-chassis-1-to-2-1000SFP',
1815 'catalyst-chassis-uplinks-1000T',
1816 ),
1817 ),
38c9bb20
DO
1818 '9.1.1208' => array
1819 (
1820 'dict_key' => 1394,
1821 'text' => 'WS-C2960S-24PS-L: 24 RJ-45/10-100-1000T(X) PoE+ + 4 SFP/1000',
1822 'processors' => array
1823 (
1824 'catalyst-chassis-mgmt',
1825 'catalyst-stack-25-to-28-SFP',
1826 'catalyst-stack-any-1000T',
1827 ),
1828 ),
13b28c20
DO
1829 '9.1.1227' => array
1830 (
1831 'dict_key' => 1577,
1832 'text' => 'WS-C3560X-48T: 48 RJ-45/10-100-1000T(X) + network module + OOBM',
1833 'processors' => array
1834 (
1835 'C3KX-NM-10000',
1836 'C3KX-NM-1000',
1837 'catalyst-chassis-any-1000T',
1838 'catalyst-chassis-mgmt',
1839 ),
1840 ),
b475f795
DO
1841 '9.1.1292' => array
1842 (
b0021c43 1843 'dict_key' => 1606,
b475f795
DO
1844 'text' => 'WS-C2360-48TD: 48 RJ-45 GigE + 4 SFP+/10000',
1845 'processors' => array ('catalyst-chassis-any-1000T', 'catalyst-chassis-mgmt', 'catalyst-chassis-uplinks-10000SFP+'),
1846 ),
65e11216
AD
1847 '9.5.42' => array
1848 (
1849 'dict_key' => 1796,
1850 'text' => 'WS-C2948G-L3: 48 RJ-45/10-100TX + 2 SFP/1000 ports',
1851 'processors' => array ('catalyst-2948-49-to-50-SFP', 'catalyst-2948-any-100TX'),
1852 'ifDescrOID' => 'entPhysicalName',
1853 ),
40b1e115
AD
1854 '9.6.1.82.24.2' => array
1855 (
1856 'dict_key' => 1784,
1857 'text' => 'SF 300-24P: RJ-45/10/100 + 2 RJ-45/10/100/1000T(X) + 2 combo-gig',
1858 'processors' => array
1859 (
1860 'generic-gi-3-to-4-combo-1000SFP',
1861 'generic-gi-3-to-4-combo-1000T',
1862 'generic-gi-1-to-2-1000T',
1863 'generic-fa-any-100TX',
1864 ),
1865 'ifDescrOID' => 'ifName',
1866 ),
b0021c43
AD
1867 '9.6.1.82.48.1' => array
1868 (
1869 'dict_key' => 1612,
1870 'text' => 'SF 300-48: 48 RJ-45/10/100 + 2 RJ-45/10-100-1000T(X) + 2 combo-gig',
1871 'processors' => array
1872 (
1873 'generic-gi-3-to-4-combo-1000SFP',
1874 'generic-gi-3-to-4-combo-1000T',
1875 'generic-gi-1-to-2-1000T',
1876 'generic-fa-any-100TX',
1877 ),
1878 'ifDescrOID' => 'ifName',
1879 ),
40b1e115
AD
1880 '9.6.1.83.10.1' => array
1881 (
1882 'dict_key' => 1785,
1883 'text' => 'SG 300-10: 8 RJ-45/10/100/1000T(X) + 2 combo-gig',
1884 'processors' => array
1885 (
1886 'generic-gi-9-to-10-combo-1000SFP',
1887 'generic-gi-9-to-10-combo-1000T',
1888 'generic-gi-any-1000T',
1889 ),
1890 'ifDescrOID' => 'ifName',
1891 ),
1892 '9.6.1.83.52.1' => array
1893 (
1894 'dict_key' => 1783,
1895 'text' => 'SG 300-52: 50 RJ-45/10/100/1000T(X) + 2 combo-gig',
1896 'processors' => array
1897 (
1898 'generic-gi-51-to-52-combo-1000SFP',
1899 'generic-gi-51-to-52-combo-1000T',
1900 'generic-gi-any-1000T',
1901 ),
1902 'ifDescrOID' => 'ifName',
1903 ),
74aee2dc
DO
1904 '9.12.3.1.3.719' => array
1905 (
1906 'dict_key' => 960,
1907 'text' => 'N5K-C5020: 40 SFP+/10000',
e7662d90 1908 'processors' => array ('nexus-any-10000SFP+', 'nexus-mgmt'),
74aee2dc 1909 ),
bc45a3a4
DO
1910 '9.12.3.1.3.798' => array
1911 (
1912 'dict_key' => 959,
1913 'text' => 'N5K-C5010: 20 SFP+/10000',
1914 'processors' => array ('nexus-any-10000SFP+', 'nexus-mgmt'),
1915 ),
0533b64d
DO
1916 '9.12.3.1.3.1008' => array
1917 (
1918 'dict_key' => 1412,
1919 'text' => 'N5K-C5548P: 32 SFP+/10000',
1920 'processors' => array ('nexus-any-10000SFP+', 'nexus-mgmt'),
1921 ),
473dd02e
JT
1922 '9.12.3.1.3.1084' => array
1923 (
1924 'dict_key' => 1412,
1925 'text' => 'N5K-C5548P: 32 SFP+/10000',
1926 'processors' => array ('nexus-any-10000SFP+', 'nexus-mgmt'),
1927 ),
a5e2273a
AD
1928 '11.2.3.7.11.9' => array
1929 (
1930 'dict_key' => 1086,
1931 'text' => 'J4121A: modular system',
1932 'processors' => array ('procurve-modular-100TX'),
1933 ),
13b28c20
DO
1934 '11.2.3.7.11.19' => array
1935 (
1936 'dict_key' => 859,
1937 'text' => 'J4813A: 24 RJ-45/10-100TX + 2 modules of varying type',
1938 'processors' => array ('procurve-chassis-100TX'),
1939 ),
6249647d
AD
1940 '11.2.3.7.11.29' => array
1941 (
1942 'dict_key' => 866,
1943 'text' => 'J4899A: 48 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
1944 'processors' => array ('procurve-49-to-50-1000T', 'procurve-chassis-100TX'),
1945 ),
4bbb87a3
AD
1946 '11.2.3.7.11.31' => array
1947 (
1948 'dict_key' => 870,
1949 'text' => 'J4903A: 24 RJ-45/10-100-1000T(X)',
1950 'processors' => array ('procurve-chassis-1000T'),
1951 ),
56a797ef
DO
1952 '11.2.3.7.11.32' => array
1953 (
1954 'dict_key' => 871,
1955 'text' => 'J4904A: 48 RJ-45/10-100-1000T(X)',
1956 'processors' => array ('procurve-chassis-1000T'),
1957 ),
4bbb87a3
AD
1958 '11.2.3.7.11.34' => array
1959 (
1960 'dict_key' => 864,
1961 'text' => 'J8164A: 24 RJ-45/10-100TX POE + 2 RJ-45/10-100-1000T(X)',
1962 'processors' => array ('procurve-25-to-26-1000T', 'procurve-chassis-100TX'),
1963 ),
74aee2dc
DO
1964 '11.2.3.7.11.36' => array
1965 (
1966 'dict_key' => 865,
4bbb87a3 1967 'text' => 'J8164A: 24 RJ-45/10-100TX PoE + 2 RJ-45/10-100-1000T(X)',
56a797ef 1968 'processors' => array ('procurve-25-to-26-1000T', 'procurve-chassis-100TX'),
74aee2dc
DO
1969 ),
1970 '11.2.3.7.11.35' => array
1971 (
1972 'dict_key' => 867,
4bbb87a3 1973 'text' => 'J8165A: 48 RJ-45/10-100TX PoE + 2 RJ-45/10-100-1000T(X)',
56a797ef
DO
1974 'processors' => array ('procurve-49-to-50-1000T', 'procurve-chassis-100TX'),
1975 ),
a5e2273a 1976 '11.2.3.7.11.44' => array
56a797ef 1977 (
a5e2273a
AD
1978 'dict_key' => 866,
1979 'text' => 'J4899B: 48 RJ-45/10-100TX + 2 RJ-45/10-100-1000T(X)',
1980 'processors' => array ('procurve-49-to-50-1000T', 'procurve-chassis-100TX'),
74aee2dc 1981 ),
4bbb87a3
AD
1982 '11.2.3.7.11.53' => array
1983 (
1984 'dict_key' => 881,
1985 'text' => 'J8773A: modular system',
1986 'processors' => array ('procurve-modular-1000T'),
1987 ),
10ab4841
AD
1988 '11.2.3.7.11.62' => array
1989 (
1990 'dict_key' => 855,
1991 'text' => 'J9020A: 48 RJ-45/10-100TX + 2 RJ-45/10-1000-1000T(x) + 2 SFP-1000',
1992 'processors' => array ('procurve-51-to-52-1000SFP', 'procurve-49-to-50-1000T', 'procurve-chassis-100TX'),
1993 ),
13b28c20
DO
1994 '11.2.3.7.11.63' => array
1995 (
1996 'dict_key' => 868,
1997 'text' => 'J9021A: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
1998 'processors' => array ('procurve-21-to-24-combo-1000SFP', 'procurve-chassis-1000T'),
1999 ),
2000 '11.2.3.7.11.65' => array
2001 (
2002 'dict_key' => 850,
2003 'text' => 'J9028A: 22 RJ-45/10-100-1000T(X) + 2 combo-gig',
2004 'processors' => array ('smc2-combo-23-to-24', 'smc2-any-1000T'),
2005 ),
a5e2273a
AD
2006 '11.2.3.7.11.68' => array
2007 (
2008 'dict_key' => 873,
2009 'text' => 'J9050A: 48 RJ-45/10-100-1000T',
2010 'processors' => array ('procurve-chassis-1000T'),
2011 ),
83aedacd
AD
2012 '11.2.3.7.11.78' => array
2013 (
2014 'dict_key' => 861,
2015 'text' => 'J9087A: 24 RJ-45/10-100TX PoE + 2 1000T + 2 SFP-1000',
2016 'processors' => array ('procurve-25-to-26-1000T', 'procurve-27-to-28-1000SFP', 'procurve-chassis-100TX'),
2017 ),
2018 '11.2.3.7.11.80' => array
2019 (
2020 'dict_key' => 1570,
2021 'text' => 'J9086A: 24 RJ-45/10-100TX 12 PoE + 2 1000T + 2 SFP-1000',
2022 'processors' => array ('procurve-25-to-26-1000T', 'procurve-27-to-28-1000SFP', 'procurve-chassis-100TX'),
2023 ),
13b28c20
DO
2024 '11.2.3.7.11.86' => array
2025 (
2026 'dict_key' => 1571,
2027 'text' => 'J9145A: 20 RJ-45/10-100-1000T(X) + 4 combo-gig + varying uplinks',
2028 'processors' => array ('procurve-21-to-24-combo-1000SFP', 'procurve-chassis-1000T'),
2029 ),
4b43f713
DO
2030 '11.2.3.7.11.87' => array
2031 (
2032 'dict_key' => 1349,
13b28c20 2033 'text' => 'J9147A: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + varying uplinks',
4b43f713
DO
2034 'processors' => array ('procurve-45-to-48-combo-1000SFP', 'procurve-chassis-1000T'),
2035 ),
f8de6305
DO
2036 '11.2.3.7.11.85' => array
2037 (
2038 'dict_key' => 1600,
2039 'text' => 'J9148A: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + varying uplinks',
2040 'processors' => array ('procurve-45-to-48-combo-1000SFP', 'procurve-chassis-1000T'),
2041 ),
db5d7da5
AD
2042 '11.2.3.7.11.88' => array
2043 (
2044 'dict_key' => 1349,
2045 'text' => 'J9279A: 22 RJ-45/10-100-1000T(X) + 2 combo-gig + varying uplinks',
2046 'processors' => array ('procurve-23-to-24-combo-1000SFP', 'procurve-chassis-1000T'),
2047 ),
10ab4841
AD
2048 '11.2.3.7.11.89' => array
2049 (
2050 'dict_key' => 857,
2051 'text' => 'J9280A: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + varying uplinks',
2052 'processors' => array ('procurve-45-to-48-combo-1000SFP', 'procurve-chassis-1000T'),
2053 ),
13b28c20
DO
2054 '11.2.3.7.11.79' => array
2055 (
2056 'dict_key' => 863,
2057 'text' => 'J9089A: 48 RJ-45/10-100TX PoE + 2 1000T + 2 SFP-1000',
2058 'processors' => array ('procurve-49-to-50-1000T', 'procurve-51-to-52-1000SFP', 'procurve-chassis-100TX'),
4bbb87a3
AD
2059 ),
2060 '11.2.3.7.11.95' => array
2061 (
2062 'dict_key' => 1711,
2063 'text' => 'J9138A: 24 RJ-45/10-100TX PoE + 2 1000T + 2 combo-gig',
2064 'processors' => array ('procurve-25-to-26-1000T', 'procurve-27-to-28-1000SFP', 'procurve-chassis-100TX'),
13b28c20 2065 ),
5d930daf
AD
2066 '11.2.3.7.11.105' => array
2067 (
2068 'dict_key' => 1641,
2069 'text' => 'J9452A: 48 RJ-45/10-100-1000T + 2 SFP-10000+',
2070 'processors' => array ('procurve-49-to-52-10000SFP+', 'procurve-chassis-1000T'),
2071 ),
4a2358b3
DO
2072 '11.2.3.7.11.33.4.1.1' => array
2073 (
2074 'dict_key' => 1605,
2075 'text' => 'HP GbE2c w/SFP',
2076 'processors' => array
2077 (
2078 'gbe2csfp-1-to-16',
2079 'gbe2csfp-17',
2080 'gbe2csfp-18',
2081 'gbe2csfp-19',
2082 'gbe2csfp-20',
2083 'gbe2csfp-21sfp',
2084 'gbe2csfp-22sfp',
2085 'gbe2csfp-23sfp',
2086 'gbe2csfp-24sfp',
2087 'gbe2csfp-21',
2088 'gbe2csfp-22',
2089 'gbe2csfp-23',
2090 'gbe2csfp-24',
2091 ),
2092 ),
1cd6eca3
AD
2093 '43.1.16.4.3.29' => array
2094 (
2095 'dict_key' => 758,
2096 'text' => '4200G: 44 RJ-45/10-100-1000T(X) + 4 combo-gig',
2097 'processors' => array ('3com-49-to-52-1000SFP', '3com-any-1000T'),
2098 ),
78cfe89b
AD
2099 '45.3.68.5' => array
2100 (
2101 'dict_key' => 1085,
2102 'text' => 'BES50GE-12T PWR: 12 RJ-45/10-100-1000T(X)',
2103 'processors' => array ('nortel-any-1000T'),
2104 ),
49055269
AD
2105 '171.10.76.10' => array
2106 (
2107 'dict_key' => 1799,
2108 'text' => 'DGS-1210-24: 20 RJ-45/10-100-1000T(X) + 4 combo ports',
2109 'processors' => array ('dlink-21-to-24-comboSFP', 'dlink-21-to-24-comboT', 'dlink-any-1000T'),
2110 'ifDescrOID' => 'ifName',
2111 ),
78cfe89b
AD
2112 '202.20.59' => array
2113 (
2114 'dict_key' => 1371,
2115 'text' => 'SMC8124L2: 20 RJ-45/10-100-1000T(X) + 4 combo ports',
2116 'processors' => array ('smc2-combo-21-to-24', 'smc2-any-1000T'),
2117 ),
2118 '202.20.66' => array
2119 (
2120 'dict_key' => 1567,
2121 'text' => 'SMC6128L2: 24 RJ-45/10-100TX + 4 combo-gig ports',
2122 'processors' => array ('smc2-combo-25-to-28', 'smc2-1000T-25-to-28', 'smc2-any-100TX'),
2123 ),
2124 '202.20.68' => array
2125 (
2126 'dict_key' => 1374,
2127 'text' => 'SMC8150L2: 46 RJ-45/10-100-1000T(X) + 4 combo ports',
2128 'processors' => array ('smc-combo-45-to-48', 'nortel-any-1000T'),
2129 ),
2130 '207.1.14.53' => array
2131 (
2132 'dict_key' => 1720,
2133 'text' => 'AT9924T: 24 RJ-45/10-100-1000T(X) ports',
2134 'processors' => array ('generic-port-any-1000T'),
2135 ),
f60a9008
AD
2136 '388.18' => array
2137 (
2138 'dict_key' => 1795,
2139 'text' => 'RFS 4000: 5 RJ-45/10-100-1000T(X) + 1 combo uplink ports',
2140 'processors' => array ('motorola-rfs-uplink-comboSFP', 'motorola-rfs-uplink-comboT', 'motorola-rfs-any-1000T'),
2141 ),
fc807353
DO
2142 '4526.100.1.1' => array
2143 (
2144 'dict_key' => 587,
2145 'text' => 'FSM7328S: 24 RJ-45/10-100TX + 4 combo-gig',
2146 'processors' => array ('netgear-chassis-any-100TX', 'netgear-chassis-any-1000SFPcombo', 'netgear-chassis-any-1000T'),
2147 ),
74aee2dc
DO
2148 '4526.100.2.2' => array
2149 (
2150 'dict_key' => 562,
6be06cbb
DO
2151 'text' => 'GSM7224: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
2152 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000T'),
74aee2dc 2153 ),
3e8ad42f
DO
2154 '4526.100.2.3' => array
2155 (
2156 'dict_key' => 559,
2157 'text' => 'GSM7212: 12 combo-gig',
2158 'processors' => array ('netgear-chassis-any-1000SFPcombo', 'netgear-chassis-any-1000T'),
2159 ),
1b24b8ae
DO
2160 '4526.100.11.1' => array
2161 (
2162 'dict_key' => 557,
2163 'text' => 'GSM7224R: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
2164 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000T'),
2165 ),
12af10b8
DO
2166 '4526.100.11.5' => array
2167 (
2168 'dict_key' => 1602,
2169 'text' => 'GSM7224v2: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
2170 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000T'),
2171 ),
e34faed3
DO
2172 '4526.100.1.13' => array
2173 (
2174 'dict_key' => 1601,
2175 'text' => 'GSM7328Sv2: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
2176 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000T'),
2177 ),
7e1ab7dc
DO
2178 '4526.100.1.14' => array
2179 (
2180 'dict_key' => 1794,
2181 'text' => 'GSM7352Sv2: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + SFP+ uplinks',
2182 'processors' => array ('netgear-chassis-45-to-48-1000SFPcombo', 'netgear-chassis-any-1000T', 'netgear-chassis-any-SFP+'),
2183 ),
91389980
DO
2184 '2636.1.1.1.2.29' => array
2185 (
2186 'dict_key' => 925,
2187 'text' => 'MX240 modular router',
2188 'processors' => array ('juniper-DPCE-R-4XGE-XFP'),
2189 ),
1f54e1ba
DO
2190 // Juniper Networks assigns single SNMP OID per series:
2191 // EX2200 2636.1.1.1.1.43
2192 // EX3200 2636.1.1.1.2.30
2193 // EX4200 2636.1.1.1.2.31
2194 // EX4500 2636.1.1.1.1.44
2195 // There is a special workaround in code below to derive specific
2196 // product number from sysDescr string.
e68824f6
AD
2197 '2636.1.1.1.2.30' => array
2198 (
8595dfd0 2199 'dict_key' => 900,
e68824f6
AD
2200 'text' => 'Juniper EX3200 series',
2201 'processors' => array ('juniper-ex-pic0-1000T', 'juniper-ex-mgmt'),
2202 ),
1f54e1ba
DO
2203 '2636.1.1.1.2.31' => array
2204 (
2205 'dict_key' => 905,
2206 'text' => 'Juniper EX4200 series',
2207 'processors' => array ('juniper-ex-pic0-1000T', 'juniper-ex-mgmt'),
2208 ),
4d6aad51
DO
2209 '2011.2.23.94' => array
2210 (
2211 'dict_key' => 1619,
2212 'text' => 'S2352P-EI: 48 RJ-45/10-100TX + 4 SFP-1000',
2213 'processors' => array ('quidway-any-100TX', 'quidway-any-1000SFP'),
2214 ),
7d69a266
DO
2215 '2011.2.23.96' => array
2216 (
2217 'dict_key' => 1321,
24c3e444 2218 'text' => 'S5328C-EI-24S: 20 SFP-1000 + 4 combo-gig + 2 XFP slots',
7d69a266
DO
2219 'processors' => array ('quidway-21-to-24-comboT', 'quidway-any-1000SFP', 'quidway-XFP', 'quidway-mgmt'),
2220 ),
b55f8de3
DO
2221 '2011.2.23.103' => array
2222 (
2223 'dict_key' => 1341,
2224 'text' => 'S5352C-SI: 48 RJ-45/10-100-1000T(X) + optional 2xXFP/4xSFP slots',
2225 'processors' => array ('quidway-slot1-SFP', 'quidway-any-1000T', 'quidway-XFP', 'quidway-mgmt'),
2226 ),
38bd461c
AA
2227 '2011.2.23.97' => array
2228 (
2229 'dict_key' => 1337,
2230 'text' => 'S5352C-EI: 48 RJ-45/10-100-1000T(X) + optional 2xXFP/4xSFP slots',
2231 'processors' => array ('quidway-slot1-SFP', 'quidway-any-1000T', 'quidway-XFP', 'quidway-mgmt'),
2232 ),
2233 '2011.2.23.95' => array
2234 (
2235 'dict_key' => 1335,
2236 'text' => 'S5328C-EI: 20 RJ-45/10-100-1000T(X) + 4 combo-gig + 2 XFP slots',
2237 'processors' => array ('quidway-21-to-24-comboSFP', 'quidway-any-1000T', 'quidway-XFP', 'quidway-mgmt'),
2238 ),
24c3e444
DO
2239 '2011.2.23.102' => array
2240 (
2241 'dict_key' => 1339,
2242 'text' => 'S5328C-SI: 20 RJ-45/10-100-1000T(X) + 4 combo-gig + 2 XFP slots',
2243 'processors' => array ('quidway-21-to-24-comboSFP', 'quidway-any-1000T', 'quidway-XFP', 'quidway-mgmt'),
2244 ),
661b3fdb
DO
2245 '1991.1.3.45.2.1.1.1' => array
2246 (
2247 'dict_key' => 127,
2248 'text' => 'FGS648P: 48 RJ-45/10-100-1000T(X) + 4 combo-gig + uplink slot',
2249 'processors' => array ('fgs-1-to-4-comboSFP', 'fgs-any-1000T', 'fgs-uplinks'),
2250 ),
2251 '1991.1.3.45.2.2.1.1' => array
2252 (
2253 'dict_key' => 131,
2254 'text' => 'FGS648P-POE: 48 RJ-45/10-100-1000T(X) + 4 combo-gig + uplink slot',
2255 'processors' => array ('fgs-1-to-4-comboSFP', 'fgs-any-1000T', 'fgs-uplinks'),
2256 ),
e9c42863
DO
2257 '1991.1.3.54.2.4.1.1' => array # L2 software
2258 (
2259 'dict_key' => 1362,
2260 'text' => 'FCX 648: 48 RJ-45/10-100-1000T(X) + uplink slot with 4 SFP+',
2261 'processors' => array ('fgs-any-1000T', 'fcx-uplinks', 'fcx-management'),
2262 ),
2263 '1991.1.3.54.2.4.1.3' => array # L3 software
ec523868
DO
2264 (
2265 'dict_key' => 1362,
2266 'text' => 'FCX 648: 48 RJ-45/10-100-1000T(X) + uplink slot with 4 SFP+',
2267 'processors' => array ('fgs-any-1000T', 'fcx-uplinks', 'fcx-management'),
2268 ),
6c32c3ff
AA
2269 '1991.1.3.46.1.1.1.1' => array
2270 (
2271 'dict_key' => 413,
2272 'text' => 'FLS 624: 20 RJ-45/10-100-1000T(X) + 4 combo-gig + 3 optional 10G modules',
2273 'processors' => array ('fls624-combo', 'fgs-any-1000T', 'fls-uplinks'),
2274 ),
2275 '1991.1.3.46.2.1.1.1' => array
2276 (
2277 'dict_key' => 414,
2278 'text' => 'FLS 648: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + 2 optional 10G modules',
2279 'processors' => array ('fls648-combo', 'fgs-any-1000T', 'fls-uplinks'),
2280 ),
13b28c20
DO
2281 '1991.1.3.52.2.2.1.1' => array
2282 (
2283 'dict_key' => 1032,
2284 'text' => 'FWS648G: 4 combo-gig + 44 RJ-45/10-100-1000T(X)',
2285 'processors' => array ('fgs-1-to-4-comboSFP', 'fgs-any-1000T'),
2286 ),
4eeadb79
DO
2287 '1916.2.71' => array
2288 (
2289 'dict_key' => 694,
2290 'text' => 'X450a-24t: 20 RJ-45/10-100-1000T(X) + 4 combo-gig + XFP uplinks slot',
2291 'processors' => array ('summit-25-to-26-XFP-uplinks', 'summit-21-to-24-comboSFP', 'summit-any-1000T', 'summit-management'),
2292 ),
dbcf1931
DO
2293 '1916.2.139' => array
2294 (
2295 'dict_key' => 1353,
2296 'text' => 'X480-24x: 12 SFP-1000 + 12 combo-gig + 2 XFP + VIM slot',
2297 'processors' => array
2298 (
2299 'summit-27-to-30-XFP-uplinks',
2300 'summit-25-to-26-XFP-uplinks',
2301 'summit-13-to-24-comboT',
2302 'summit-any-SFP',
2303 'summit-management'
2304 ),
2305 ),
8acd246d
DO
2306 '6027.1.3.12' => array
2307 (
2308 'dict_key' => 1471,
2309 'text' => 'Force10 S60: 44 RJ-45/10-100-1000T(X) + 4 SFP-1000 ports + 0/2/4 SFP+ ports',
1e5a92d8
DO
2310 'processors' => array ('ftos-44-to-47-1000SFP', 'ftos-any-1000T', 'ftos-any-10000SFP+', 'ftos-mgmt'),
2311 ),
84ea7e6e
DO
2312 '6027.1.3.13' => array
2313 (
2314 'dict_key' => 1470,
2315 'text' => 'Force10 S55: 44 RJ-45/10-100-1000T(X) + 4 SFP-1000 ports + 0/2/4 SFP+ ports',
2316 'processors' => array ('ftos-44-to-47-1000SFP', 'ftos-any-1000T', 'ftos-any-10000SFP+', 'ftos-mgmt'),
2317 ),
1e5a92d8
DO
2318 '6027.1.3.14' => array
2319 (
2320 'dict_key' => 1472,
2321 'text' => 'Force10 S4810: 48 SFP+-1000/10000 + 4 QSFP-40000 ports',
2322 'processors' => array ('ftos-any-10000SFP+', 'ftos-any-QSFP+', 'ftos-mgmt'),
8acd246d 2323 ),
a28aee72
AD
2324 '12356.101.1.3002'=> array
2325 (
2326 'dict_key' => 1609,
2327 'text' => 'FG310B: 10 RJ-45/10-1000T',
78cfe89b 2328 'processors' => array('generic-port-any-1000T'),
a28aee72 2329 ),
2ea5fd28
DO
2330 '30065.1.3011.7048.427.3648' => array
2331 (
2332 'dict_key' => 1726,
2333 'text' => 'DCS-7048T-A: 48 1000T + 4 SFP+/10000',
2334 'processors' => array ('arista-49-to-52-SFP+', 'arista-any-1000T', 'arista-management'),
2335 ),
9d223b3e
DO
2336 '30065.1.3011.7050.3282.52' => array
2337 (
2338 'dict_key' => 1731,
2339 'text' => 'DCS-7050S-52: 52 SFP+',
2340 'processors' => array ('arista-any-SFP+', 'arista-management'),
2341 ),
06a03a99
AD
2342 '30065.1.3011.7124.3282' => array
2343 (
92df4b0e
AD
2344 'dict_key' => 1610,
2345 'text' => 'DCS-7124S: 24 SFP+/10000',
2346 'processors' => array ('arista-any-SFP+', 'arista-management'),
2347 ),
1ce6a44d
AD
2348 '674.10895.4' => array
2349 (
2350 'dict_key' => 1622,
2351 'text' => 'PowerConnect 5224: 20 RJ-45/10-100-1000T(X) + 4 combo ports',
2352 'processors' => array ('dell-5224-21-to-24-combo-1000SFP', 'dell-52xx-any-1000T'),
2353 ),
1b10e7cf
AD
2354 '674.10895.3000' => array
2355 (
2356 'dict_key' => 1623,
2357 'text' => 'PowerConnect 6024F: 16 SFP + 8 combo ports',
8595dfd0 2358 'processors' => array ('dell-g17-to-g24-combo-1000T', 'dell-any-1000SFP'),
1b10e7cf
AD
2359 'ifDescrOID' => 'ifName',
2360 ),
92df4b0e
AD
2361 '674.10895.3003' => array
2362 (
2363 'dict_key' => 1611,
2364 'text' => 'PowerConnect 3348: 48 RJ-45/10-100TX + 2 combo ports',
2365 'processors' => array ('dell-33xx-any-combo-1000SFP', 'dell-33xx-any-1000T', 'dell-33xx-any-100TX'),
2366 'ifDescrOID' => 'entPhysicalName',
2367 ),
1b10e7cf
AD
2368 '674.10895.3004' => array
2369 (
2370 'dict_key' => 349,
2371 'text' => 'PowerConnect 5324: 20 RJ-45/10-100-1000T(X) + 4 combo ports',
8595dfd0 2372 'processors' => array ('dell-g21-to-g24-combo-1000SFP', 'generic-g-any-1000T'),
1b10e7cf
AD
2373 'ifDescrOID' => 'ifName',
2374 ),
92df4b0e
AD
2375 '674.10895.3007' => array
2376 (
2377 'dict_key' => 347,
2378 'text' => 'PowerConnect 3448: 48 RJ-45/10-100TX + 2 SFP/1000 + 2 RJ-45/10-100-1000T(X) ports',
d7d68b9b 2379 'processors' => array ('dell-g1-to-g2-1000SFP', 'dell-g3-to-g4-1000T', 'generic-e-any-100TX'),
92df4b0e
AD
2380 'ifDescrOID' => 'ifName',
2381 ),
2382 '674.10895.3009' => array
2383 (
2384 'dict_key' => 348,
2385 'text' => 'PowerConnect 3448P: 48 RJ-45/10-100TX PoE + 2 SFP/1000 + 2 RJ-45/10-100-1000T(X) ports',
d7d68b9b 2386 'processors' => array ('dell-g1-to-g2-1000SFP', 'dell-g3-to-g4-1000T', 'generic-e-any-100TX'),
92df4b0e
AD
2387 'ifDescrOID' => 'ifName',
2388 ),
367fcba0
AD
2389 '674.10895.3010' => array
2390 (
2391 'dict_key' => 350,
2392 'text' => 'PowerConnect 6224: 20 RJ-45/10-100-1000T(X) + 4 combo-gig',
2393 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000T'),
2394 ),
0d456a22
DO
2395 '674.10895.3011' => array
2396 (
2397 'dict_key' => 353,
2398 'text' => 'PowerConnect 6248: 44 RJ-45/10-100-1000T(X) + 4 combo-gig + optional uplinks',
2399 # 10G uplinks actually may be SFP+, T, CX4 or XFP
2400 'processors' => array ('netgear-chassis-45-to-48-1000SFPcombo', 'netgear-chassis-any-1000T', 'netgear-chassis-any-SFP+'),
2401 ),
e326551d
AD
2402 '674.10895.3014' => array
2403 (
2404 'dict_key' => 352,
2405 'text' => 'PowerConnect 6224F: 20 SFP + 4 combo-gig',
2406 'processors' => array ('netgear-chassis-21-to-24-1000SFP', 'netgear-chassis-21-to-24-1000Tcombo', 'netgear-chassis-any-1000SFP'),
2407 ),
92df4b0e
AD
2408 '674.10895.3017' => array
2409 (
2410 'dict_key' => 1067,
2411 'text' => 'PowerConnect 3548: 48 RJ-45/10-100TX + 2 SFP/1000 + 2 RJ-45/10-100-1000T(X) ports',
d7d68b9b 2412 'processors' => array ('dell-g1-to-g2-1000SFP', 'dell-g3-to-g4-1000T', 'generic-e-any-100TX'),
92df4b0e
AD
2413 ),
2414 '674.10895.3019' => array
2415 (
2416 'dict_key' => 1068,
2417 'text' => 'PowerConnect 3548P: 48 RJ-45/10-100TX PoE + 2 SFP/1000 + 2 RJ-45/10-100-1000T(X) ports',
d7d68b9b 2418 'processors' => array ('dell-g1-to-g2-1000SFP', 'dell-g3-to-g4-1000T', 'generic-e-any-100TX'),
92df4b0e 2419 ),
92df4b0e
AD
2420 '674.10895.3020' => array
2421 (
2422 'dict_key' => 1069,
2423 'text' => 'PowerConnect 5424: 20 RJ-45/10-100-1000T(X) + 4 combo ports',
8595dfd0 2424 'processors' => array ('dell-g21-to-g24-combo-1000SFP', 'generic-g-any-1000T'),
92df4b0e
AD
2425 'ifDescrOID' => 'ifName',
2426 ),
2427 '674.10895.3021' => array
2428 (
2429 'dict_key' => 1070,
2430 'text' => 'PowerConnect 5448: 44 RJ-45/10-100-1000T(X) + 4 combo ports',
8595dfd0 2431 'processors' => array ('generic-g45-to-g48-combo-1000SFP', 'generic-g-any-1000T'),
92df4b0e 2432 'ifDescrOID' => 'ifName',
06a03a99 2433 ),
ac02ab69
AD
2434 '10977.11825.11833.97.25451.12800.100.4.4' => array
2435 (
2436 'dict_key' => 577,
2437 'text' => 'FS750T2: 48 RJ-45/10-100TX + 2 combo-gig',
2438 'processors' => array ('netgear-49-to-50-combo-1000SFP', 'netgear-49-to-50-combo-1000T', 'netgear-any-100TX'),
2439 ),
8595dfd0
AD
2440 '3955.6.1.2048.1' => array
2441 (
2442 'dict_key' => 1624,
2443 'text' => 'Linksys SRW2048: 44 RJ-45/10-100-1000T(X) + 4 combo ports',
2444 'processors' => array ('generic-g45-to-g48-combo-1000SFP', 'generic-g-any-1000T'),
2445 'ifDescrOID' => 'ifName',
2446 ),
d7d68b9b
AD
2447 '3955.6.5024' => array
2448 (
2449 'dict_key' => 1966,
2450 'text' => 'Linksys SRW224G4: 24-port 10/100 + 4-Port Gigabit Switch with WebView',
2451 'processors' => array ('generic-g-1-to-2-1000T', 'generic-g-3-to-4-combo-1000SFP', 'generic-g-3-to-4-combo-1000T', 'generic-e-any-100TX'),
2452 'ifDescrOID' => 'ifName',
2453 ),
c4acc30b
AD
2454 '11863.6.10.58' => array
2455 (
2456 'dict_key' => 1793,
2457 'text' => 'TL-SG5426: 22 RJ-45/10-100-1000T(X) + 4 combo ports',
2458 'processors' => array ('tplink-21-to-24-combo-1000SFP', 'tplink-any-1000T'),
2459 ),
a3520e4c
DO
2460 '119.1.203.2.2.41' => array
2461 (
2462 'dict_key' => 1810,
2463 'text' => 'PF5240: 48 RJ-45/10-100-1000T(X) + 4 SFP+',
2464 'processors' => array ('nec-any-1000T', 'nec-any-SFP+', 'nec-mgmt'),
2465 ),
ecc982a6
DO
2466 '26543.1.7.6' => array
2467 (
2468 'dict_key' => 1888,
2469 'text' => 'G8264: 48 SFP+ + 4 QSFP+ w/breakout',
2470 'processors' => array ('ibm-any-SFP+', 'ibm-mgmt'),
2471 ),
24ae7cd1
DO
2472 '26543.1.7.7' => array
2473 (
2474 'dict_key' => 1887,
2475 'text' => 'G8052: 48 RJ-45/10-100-1000T(X) + 4 SFP+',
2476 'processors' => array ('ibm-49-to-52-SFP+', 'ibm-any-1000T'),
2477 ),
74aee2dc
DO
2478);
2479
536e7323 2480global $swtype_pcre;
1f54e1ba
DO
2481$swtype_pcre = array
2482(
2483 '/Huawei Versatile Routing Platform Software.+VRP.+Software, Version 5.30 /s' => 1360,
2484 '/Huawei Versatile Routing Platform Software.+VRP.+Software, Version 5.50 /s' => 1361,
8732faac 2485 '/Huawei Versatile Routing Platform Software.+VRP.+Software,\s*Version 5.70 /is' => 1369,
1f54e1ba
DO
2486 // FIXME: get sysDescr for IronWare 5 and add a pattern
2487 '/^Brocade Communications Systems.+, IronWare Version 07\./' => 1364,
2488 '/^Juniper Networks,.+JUNOS 9\./' => 1366,
2489 '/^Juniper Networks,.+JUNOS 10\./' => 1367,
2ea5fd28 2490 '/^Arista Networks EOS version 4\./' => 1675,
1f54e1ba
DO
2491);
2492
74aee2dc
DO
2493function updateStickerForCell ($cell, $attr_id, $new_value)
2494{
dec748f6 2495 if
472510e7 2496 (
dec748f6
MH
2497 isset ($cell['attrs'][$attr_id])
2498 and !strlen ($cell['attrs'][$attr_id]['value'])
472510e7
AA
2499 and strlen ($new_value)
2500 )
74aee2dc
DO
2501 commitUpdateAttrValue ($cell['id'], $attr_id, $new_value);
2502}
2503
bdc91a5c
DO
2504// Accept "X-Y" on input and make sure, that PortInterfaceCompat contains
2505// a record with IIF id = X and OIF id = Y.
2506function checkPIC ($port_type_id)
2507{
f2005400
AA
2508 // cache PortInterfaceCompat
2509 static $compat_array = NULL;
2510 if (! isset ($compat_array))
bdc91a5c 2511 {
f2005400
AA
2512 $compat_array = array();
2513 foreach (getPortInterfaceCompat() as $record)
2514 {
2515 $key = $record['iif_id'] . '-' . $record['oif_id'];
2516 $compat_array[$key] = 1;
2517 }
2518 }
92df4b0e 2519
f2005400
AA
2520 if (preg_match ('/^(\d+-)?(\d+)$/', $port_type_id, $m))
2521 {
2522 $iif_id = $m[1];
2523 $oif_id = $m[2];
2524 if (empty ($iif_id[1]))
2525 {
2526 $iif_id = 1;
2527 $port_type_id = $iif_id . '-' . $port_type_id;
2528 }
2529 if (! array_key_exists ($port_type_id, $compat_array))
2530 {
2531 commitSupplementPIC ($iif_id, $oif_id);
2532 $compat_array[$port_type_id] = 1;
2533 }
bdc91a5c 2534 }
bdc91a5c
DO
2535}
2536
8536e20a
DO
2537$msgcode['doSNMPmining']['ERR1'] = 161;
2538$msgcode['doSNMPmining']['ERR2'] = 162;
8228bdb4 2539function doSNMPmining ($object_id, $snmpsetup)
74aee2dc 2540{
74aee2dc
DO
2541 $objectInfo = spotEntity ('object', $object_id);
2542 $objectInfo['attrs'] = getAttrValues ($object_id);
2543 $endpoints = findAllEndpoints ($object_id, $objectInfo['name']);
2544 if (count ($endpoints) == 0)
8ab645cf 2545 return showFuncMessage (__FUNCTION__, 'ERR1'); // endpoint not found
74aee2dc 2546 if (count ($endpoints) > 1)
8ab645cf 2547 return showFuncMessage (__FUNCTION__, 'ERR2'); // can't pick an address
4848a7e3
DO
2548
2549 switch ($objectInfo['objtype_id'])
2550 {
24a6e3a2 2551 case 7:
4848a7e3 2552 case 8:
7b2a1a90 2553 $device = new RTSNMPDevice ($endpoints[0], $snmpsetup);
8228bdb4 2554 return doSwitchSNMPmining ($objectInfo, $device);
4848a7e3 2555 case 2:
7b2a1a90 2556 $device = new APCPowerSwitch ($endpoints[0], $snmpsetup);
8228bdb4 2557 return doPDUSNMPmining ($objectInfo, $device);
92df4b0e 2558 }
4848a7e3
DO
2559}
2560
24a6e3a2 2561$msgcode['doSwitchSNMPmining']['ERR3'] = 188;
e22f9600 2562$msgcode['doSwitchSNMPmining']['ERR4'] = 189;
8228bdb4 2563function doSwitchSNMPmining ($objectInfo, $device)
4848a7e3 2564{
4848a7e3 2565 global $known_switches, $iftable_processors;
92df4b0e 2566
8228bdb4 2567 if (FALSE === ($sysObjectID = $device->snmpget ('sysObjectID.0')))
8ab645cf 2568 return showFuncMessage (__FUNCTION__, 'ERR3'); // // fatal SNMP failure
ac02ab69 2569 $sysObjectID = preg_replace ('/^.*(enterprises\.|joint-iso-ccitt\.)([\.[:digit:]]+)$/', '\\2', $sysObjectID);
8228bdb4
DO
2570 $sysName = substr ($device->snmpget ('sysName.0'), strlen ('STRING: '));
2571 $sysDescr = substr ($device->snmpget ('sysDescr.0'), strlen ('STRING: '));
74aee2dc 2572 $sysDescr = str_replace (array ("\n", "\r"), " ", $sysDescr); // Make it one line
92df4b0e 2573 $ifDescr_tablename = (isset($known_switches[$sysObjectID]['ifDescrOID'])) ? $known_switches[$sysObjectID]['ifDescrOID'] : 'ifDescr';
74aee2dc 2574 if (!isset ($known_switches[$sysObjectID]))
8ab645cf 2575 return showFuncMessage (__FUNCTION__, 'ERR4', array ($sysObjectID)); // unknown OID
7e577e27 2576 showSuccess ($known_switches[$sysObjectID]['text']);
5e193b67
DO
2577 foreach (array_keys ($known_switches[$sysObjectID]['processors']) as $pkey)
2578 if (!array_key_exists ($known_switches[$sysObjectID]['processors'][$pkey], $iftable_processors))
2579 {
8ab645cf 2580 showWarning ('processor "' . $known_switches[$sysObjectID]['processors'][$pkey] . '" not found');
5e193b67
DO
2581 unset ($known_switches[$sysObjectID]['processors'][$pkey]);
2582 }
56a797ef 2583 updateStickerForCell ($objectInfo, 2, $known_switches[$sysObjectID]['dict_key']);
74aee2dc
DO
2584 updateStickerForCell ($objectInfo, 3, $sysName);
2585 switch (1)
2586 {
da273595 2587 case preg_match ('/^9\.1\./', $sysObjectID): // Catalyst w/one AC port
84986395
DO
2588 $exact_release = preg_replace ('/^.*, Version ([^ ]+), .*$/', '\\1', $sysDescr);
2589 $major_line = preg_replace ('/^([[:digit:]]+\.[[:digit:]]+)[^[:digit:]].*/', '\\1', $exact_release);
74aee2dc
DO
2590 $ios_codes = array
2591 (
2592 '12.0' => 244,
2593 '12.1' => 251,
2594 '12.2' => 252,
90cdae19 2595 '15.0' => 1901,
74aee2dc
DO
2596 );
2597 updateStickerForCell ($objectInfo, 5, $exact_release);
6be06cbb
DO
2598 if (array_key_exists ($major_line, $ios_codes))
2599 updateStickerForCell ($objectInfo, 4, $ios_codes[$major_line]);
8228bdb4 2600 $sysChassi = $device->snmpget ('1.3.6.1.4.1.9.3.6.3.0');
74aee2dc
DO
2601 if ($sysChassi !== FALSE or $sysChassi !== NULL)
2602 updateStickerForCell ($objectInfo, 1, str_replace ('"', '', substr ($sysChassi, strlen ('STRING: '))));
bdc91a5c
DO
2603 checkPIC ('1-29');
2604 commitAddPort ($objectInfo['id'], 'con0', '1-29', 'console', ''); // RJ-45 RS-232 console
b3f84e8e
AD
2605 if (preg_match ('/Cisco IOS Software, C2600/', $sysDescr))
2606 commitAddPort ($objectInfo['id'], 'aux0', '1-29', 'auxillary', ''); // RJ-45 RS-232 aux port
da273595
AD
2607 if ($sysObjectID == '9.1.956')
2608 {
2609 // models with two AC inputs
2610 checkPIC ('1-16');
2611 commitAddPort ($objectInfo['id'], 'AC-in-1', '1-16', 'AC1', '');
2612 commitAddPort ($objectInfo['id'], 'AC-in-2', '1-16', 'AC2', '');
2613 }
2614 elseif ($sysObjectID != '9.1.749' and $sysObjectID != '9.1.920')
facd0235 2615 {
da273595 2616 // assume the rest have one AC input, but exclude blade devices
facd0235
DO
2617 checkPIC ('1-16'); // AC input
2618 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2619 }
74aee2dc 2620 break;
65e11216 2621 case preg_match ('/^9\.5\.42/', $sysObjectID): // Catalyst 2948 running CatOS
869d4ff4
DO
2622 case preg_match ('/^9\.6\.1\./', $sysObjectID): // Cisco SF series
2623 checkPIC ('1-681');
2624 commitAddPort ($objectInfo['id'], 'con0', '1-681', 'console', ''); // DB-9 RS-232 console
b0021c43
AD
2625 checkPIC ('1-16');
2626 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2627 break;
56a797ef 2628 case preg_match ('/^9\.12\.3\.1\.3\./', $sysObjectID): // Nexus
84986395
DO
2629 $exact_release = preg_replace ('/^.*, Version ([^ ]+), .*$/', '\\1', $sysDescr);
2630 $major_line = preg_replace ('/^([[:digit:]]+\.[[:digit:]]+)[^[:digit:]].*/', '\\1', $exact_release);
74aee2dc
DO
2631 $nxos_codes = array
2632 (
2633 '4.0' => 963,
2634 '4.1' => 964,
2635 );
6be06cbb
DO
2636 if (array_key_exists ($major_line, $nxos_codes))
2637 updateStickerForCell ($objectInfo, 4, $nxos_codes[$major_line]);
74aee2dc 2638 updateStickerForCell ($objectInfo, 5, $exact_release);
0533b64d
DO
2639 $sysChassi = $device->snmpget ('1.3.6.1.2.1.47.1.1.1.1.11.149');
2640 if ($sysChassi !== FALSE or $sysChassi !== NULL)
2641 updateStickerForCell ($objectInfo, 1, str_replace ('"', '', substr ($sysChassi, strlen ('STRING: '))));
bdc91a5c 2642 checkPIC ('1-29');
24a6e3a2 2643 commitAddPort ($objectInfo['id'], 'con0', '1-29', 'console', ''); // RJ-45 RS-232 console
dcfa87d7
DO
2644 checkPIC ('1-16'); // AC input
2645 commitAddPort ($objectInfo['id'], 'AC-in-1', '1-16', 'AC1', '');
2646 commitAddPort ($objectInfo['id'], 'AC-in-2', '1-16', 'AC2', '');
74aee2dc 2647 break;
13b28c20
DO
2648 case preg_match ('/^11\.2\.3\.7\.11\.(\d+)$/', $sysObjectID, $matches): // ProCurve
2649 $console_per_product = array
2650 (
5d930daf
AD
2651 33 => '1-29', # RJ-45 RS-232
2652 63 => '1-29',
83aedacd
AD
2653 78 => '1-29',
2654 79 => '1-29',
2655 80 => '1-29',
13b28c20
DO
2656 86 => '1-29',
2657 87 => '1-29',
13b28c20
DO
2658 19 => '1-681', # DB-9 RS-232
2659 );
2660 if (array_key_exists ($matches[1], $console_per_product))
2661 {
2662 checkPIC ($console_per_product[$matches[1]]);
5d930daf 2663 commitAddPort ($objectInfo['id'], 'console', $console_per_product[$matches[1]], 'console', '');
13b28c20 2664 }
5d930daf
AD
2665 $oom_per_product = array
2666 (
2667 33 => '1-24', # RJ-45 100Mb
2668 );
2669 if (array_key_exists ($matches[1], $oom_per_product))
2670 {
2671 checkPIC ($oom_per_product[$matches[1]]);
2672 commitAddPort ($objectInfo['id'], 'mgmt', $oom_per_product[$matches[1]], 'mgmt', '');
2673 }
2674 checkPIC ('1-16');
2675 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
84986395 2676 $exact_release = preg_replace ('/^.* revision ([^ ]+), .*$/', '\\1', $sysDescr);
74aee2dc
DO
2677 updateStickerForCell ($objectInfo, 5, $exact_release);
2678 break;
5f2354ce 2679 case preg_match ('/^4526\.100\./', $sysObjectID): // NETGEAR
bdc91a5c
DO
2680 checkPIC ('1-681');
2681 commitAddPort ($objectInfo['id'], 'console', '1-681', 'console', ''); // DB-9 RS-232 console
6be06cbb 2682 break;
7d69a266 2683 case preg_match ('/^2011\.2\.23\./', $sysObjectID): // Huawei
1f54e1ba 2684 detectSoftwareType ($objectInfo, $sysDescr);
bdc91a5c 2685 checkPIC ('1-681');
b55f8de3 2686 commitAddPort ($objectInfo['id'], 'con0', '1-681', 'console', ''); // DB-9 RS-232 console
7d69a266 2687 break;
e68824f6 2688 case preg_match ('/^2636\.1\.1\.1\.2\.3(0|1)/', $sysObjectID): // Juniper EX3200/EX4200
1f54e1ba 2689 detectSoftwareType ($objectInfo, $sysDescr);
e68824f6
AD
2690 $sw_version = preg_replace ('/^.*, kernel JUNOS ([^ ]+).*$/', '\\1', $sysDescr);
2691 updateStickerForCell ($objectInfo, 5, $sw_version);
2692 // one RJ-45 RS-232 and one AC port (it could be DC, but chances are it's AC)
1f54e1ba
DO
2693 checkPIC ('1-29');
2694 commitAddPort ($objectInfo['id'], 'con', '1-29', 'CON', ''); // RJ-45 RS-232 console
e68824f6
AD
2695 checkPIC ('1-16');
2696 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2697 // Juniper uses the same sysObjectID for multiple HW models, override if necessary
2698 if (preg_match ('/^Juniper Networks, Inc. ex3200-48t internet router/', $sysDescr))
2699 updateStickerForCell ($objectInfo, 2, 902);
1f54e1ba
DO
2700 if (preg_match ('/^Juniper Networks, Inc. ex4200-48t internet router/', $sysDescr))
2701 updateStickerForCell ($objectInfo, 2, 907);
1f54e1ba 2702 break;
7d69a266 2703 case preg_match ('/^2636\.1\.1\.1\.2\./', $sysObjectID): // Juniper
1f54e1ba 2704 detectSoftwareType ($objectInfo, $sysDescr);
bdc91a5c
DO
2705 checkPIC ('1-681');
2706 commitAddPort ($objectInfo['id'], 'console', '1-681', 'console', ''); // DB-9 RS-232 console
661b3fdb
DO
2707 break;
2708 case preg_match ('/^1991\.1\.3\.45\./', $sysObjectID): // snFGSFamily
6c32c3ff 2709 case preg_match ('/^1991\.1\.3\.46\./', $sysObjectID): // snFLSFamily
ec523868 2710 case preg_match ('/^1991\.1\.3\.54\.2\.4\.1\.1$/', $sysObjectID): // FCX 648
1f54e1ba 2711 detectSoftwareType ($objectInfo, $sysDescr);
84986395 2712 $exact_release = preg_replace ('/^.*, IronWare Version ([^ ]+) .*$/', '\\1', $sysDescr);
661b3fdb
DO
2713 updateStickerForCell ($objectInfo, 5, $exact_release);
2714 # FOUNDRY-SN-AGENT-MIB::snChasSerNum.0
8228bdb4 2715 $sysChassi = $device->snmpget ('enterprises.1991.1.1.1.1.2.0');
661b3fdb
DO
2716 if ($sysChassi !== FALSE or $sysChassi !== NULL)
2717 updateStickerForCell ($objectInfo, 1, str_replace ('"', '', substr ($sysChassi, strlen ('STRING: '))));
2718
2719 # Type of uplink module installed.
2720 # table: FOUNDRY-SN-AGENT-MIB::snAgentBrdMainBrdDescription
2721 # Possible part numbers are:
2722 # FGS-1XG1XGC (one fixed CX4 port)
2723 # FGS-2XGC (two fixed CX4 ports)
2724 # FGS-2XG (two XFP slots)
6c32c3ff
AA
2725 # And for FLS result (which is not handled here) would be:
2726 # 1991.1.1.2.2.1.1.2.1 = STRING: "FLS-24G 24-port Management Module"
2727 # 1991.1.1.2.2.1.1.2.3 = STRING: "FLS-1XG 1-port 10G Module (1-XFP)"
2728 # 1991.1.1.2.2.1.1.2.4 = STRING: "FLS-1XG 1-port 10G Module (1-XFP)"
2729 # (assuming, that the device has 2 XFP modules in slots 3 and 4).
2730
8228bdb4 2731 foreach ($device->snmpwalkoid ('enterprises.1991.1.1.2.2.1.1.2') as $module_raw)
661b3fdb
DO
2732 if (preg_match ('/^STRING: "(FGS-1XG1XGC|FGS-2XGC) /i', $module_raw))
2733 {
2734 $iftable_processors['fgs-uplinks']['dict_key'] = '1-40'; // CX4
2735 break;
2736 }
2737
2738 # AC inputs
2739 # table: FOUNDRY-SN-AGENT-MIB::snChasPwrSupplyDescription
2740 # "Power supply 1 "
2741 # "Power supply 2 "
8228bdb4 2742 foreach ($device->snmpwalkoid ('enterprises.1991.1.1.1.2.1.1.2') as $PSU_raw)
661b3fdb
DO
2743 {
2744 $count = 0;
2745 $PSU_cooked = trim (preg_replace ('/^string: "(.+)"$/i', '\\1', $PSU_raw, 1, $count));
2746 if ($count)
2747 {
2748 checkPIC ('1-16');
2749 commitAddPort ($objectInfo['id'], $PSU_cooked, '1-16', '', '');
2750 }
2751 }
2752 # fixed console port
2753 checkPIC ('1-681');
2754 commitAddPort ($objectInfo['id'], 'console', '1-681', 'console', ''); // DB-9 RS-232 console
661b3fdb 2755 break;
4eeadb79
DO
2756 case preg_match ('/^1916\.2\./', $sysObjectID): // Extreme Networks Summit
2757 $xos_release = preg_replace ('/^ExtremeXOS version ([[:digit:]]+)\..*$/', '\\1', $sysDescr);
2758 $xos_codes = array
2759 (
2760 '10' => 1350,
2761 '11' => 1351,
2762 '12' => 1352,
2763 );
2764 if (array_key_exists ($xos_release, $xos_codes))
2765 updateStickerForCell ($objectInfo, 4, $xos_codes[$xos_release]);
2766 checkPIC ('1-681');
2767 commitAddPort ($objectInfo['id'], 'console', '1-681', 'console', ''); // DB-9 RS-232
2768 checkPIC ('1-16');
2769 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
4eeadb79 2770 break;
8acd246d 2771 case preg_match ('/^6027\.1\./', $sysObjectID): # Force10
1e5a92d8 2772 commitAddPort ($objectInfo['id'], 'aux0', '1-29', 'RS-232', ''); // RJ-45 RS-232 console
8acd246d
DO
2773 $m = array();
2774 if (preg_match ('/Force10 Application Software Version: ([\d\.]+)/', $sysDescr, $m))
6dd5c55c 2775 {
8acd246d 2776 updateStickerForCell ($objectInfo, 5, $m[1]);
241db860 2777 $ftos_release = preg_replace ('/^([678])\..+$/', '\\1', $m[1]);
6dd5c55c
DO
2778 $ftos_codes = array
2779 (
2780 '6' => 1592,
2781 '7' => 1593,
2782 '8' => 1594,
2783 );
2784 if (array_key_exists ($ftos_release, $ftos_codes))
2785 updateStickerForCell ($objectInfo, 4, $ftos_codes[$ftos_release]);
2786 }
8acd246d
DO
2787 # F10-S-SERIES-CHASSIS-MIB::chStackUnitSerialNumber.1
2788 $serialNo = $device->snmpget ('enterprises.6027.3.10.1.2.2.1.12.1');
84ea7e6e
DO
2789 # F10-S-SERIES-CHASSIS-MIB::chSysPowerSupplyType.1.1
2790 if ($device->snmpget ('enterprises.6027.3.10.1.2.3.1.3.1.1') == 'INTEGER: 1')
2791 {
2792 checkPIC ('1-16');
2793 commitAddPort ($objectInfo['id'], 'PSU0', '1-16', 'PSU0', '');
2794 }
2795 # F10-S-SERIES-CHASSIS-MIB::chSysPowerSupplyType.1.2
2796 if ($device->snmpget ('enterprises.6027.3.10.1.2.3.1.3.1.2') == 'INTEGER: 1')
2797 {
2798 checkPIC ('1-16');
2799 commitAddPort ($objectInfo['id'], 'PSU1', '1-16', 'PSU1', '');
2800 }
8acd246d
DO
2801 if (strlen ($serialNo))
2802 updateStickerForCell ($objectInfo, 1, str_replace ('"', '', substr ($serialNo, strlen ('STRING: '))));
2803 break;
13b28c20 2804 case preg_match ('/^202\.20\./', $sysObjectID): // SMC TigerSwitch
1ce6a44d
AD
2805 case preg_match ('/^674\.10895\.4/', $sysObjectID): // Dell PowerConnect
2806 case preg_match ('/^674\.10895\.300(3|4|7|9)/', $sysObjectID):
e326551d 2807 case preg_match ('/^674\.10895\.301(0|4|7|9)/', $sysObjectID):
92df4b0e 2808 case preg_match ('/^674\.10895\.302(0|1)/', $sysObjectID):
8595dfd0 2809 case preg_match ('/^3955\.6\.1\.2048\.1/', $sysObjectID): // Linksys
d7d68b9b 2810 case preg_match ('/^3955\.6\.5024/', $sysObjectID):
c4acc30b 2811 case preg_match ('/^11863\.6\.10\.58/', $sysObjectID): // TPLink
8595dfd0 2812 // one DB-9 RS-232 and one AC port
13b28c20
DO
2813 checkPIC ('1-681');
2814 commitAddPort ($objectInfo['id'], 'console', '1-681', '', ''); // DB-9 RS-232
2815 checkPIC ('1-16');
2816 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
13b28c20 2817 break;
f60a9008
AD
2818 case preg_match ('/^388\.18/', $sysObjectID): // Motorola RFS 4000
2819 // one RJ-45 RS-232 and one AC port
2820 checkPIC ('1-29');
2821 commitAddPort ($objectInfo['id'], 'console', '1-29', 'console', '');
2822 checkPIC ('1-16');
2823 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2824 break;
78cfe89b
AD
2825 case preg_match ('/^207\.1\.14\./', $sysObjectID): // Allied Telesyn
2826 // one RJ-45 RS-232 and two AC ports
2827 checkPIC ('1-29');
2828 commitAddPort ($objectInfo['id'], 'console', '1-29', 'console', '');
2829 checkPIC ('1-16');
2830 commitAddPort ($objectInfo['id'], 'AC-in-1', '1-16', 'AC1', '');
2831 commitAddPort ($objectInfo['id'], 'AC-in-2', '1-16', 'AC2', '');
2832 break;
1b10e7cf
AD
2833 case preg_match ('/^674\.10895\.3000/', $sysObjectID):
2834 // one DB-9 RS-232, one 100Mb OOB mgmt, and one AC port
2835 checkPIC ('1-681');
2836 commitAddPort ($objectInfo['id'], 'console', '1-681', '', ''); // DB-9 RS-232
2837 checkPIC ('1-19');
2838 commitAddPort ($objectInfo['id'], 'mgmt', '1-19', '', '');
2839 checkPIC ('1-16');
2840 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2841 break;
1cd6eca3
AD
2842 case preg_match ('/^43\.1\.16\.4\.3\.29/', $sysObjectID): // 3Com
2843 $sw_version = preg_replace('/^.* Version 3Com OS ([^ ]+).*$/', '\\1', $sysDescr);
2844 updateStickerForCell ($objectInfo, 5, $sw_version);
2845
2846 // one RJ-45 RS-232 and one AC port
2847 checkPIC ('1-29');
2848 commitAddPort ($objectInfo['id'], 'console', '1-29', '', ''); // RJ-45 RS-232 console
2849 checkPIC ('1-16');
2850 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2851 break;
ac02ab69
AD
2852 case preg_match ('/^10977\.11825\.11833\.97\.25451\.12800\.100\.4\.4/', $sysObjectID): // Netgear
2853 $sw_version = preg_replace('/^.* V([^ ]+).*$/', '\\1', $sysDescr);
2854 updateStickerForCell ($objectInfo, 5, $sw_version);
2855
49055269
AD
2856 // one AC port, no console
2857 checkPIC ('1-16');
2858 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2859 break;
2860 case preg_match ('/^171\.10\.76\.10/', $sysObjectID): // D-Link DGS-1210-24
ac02ab69
AD
2861 // one AC port, no console
2862 checkPIC ('1-16');
2863 commitAddPort ($objectInfo['id'], 'AC-in', '1-16', '', '');
2864 break;
2ea5fd28
DO
2865 case preg_match ('/^30065\.1\.3011\./', $sysObjectID): // Arista
2866 detectSoftwareType ($objectInfo, $sysDescr);
2867 checkPIC ('1-29');
2868 commitAddPort ($objectInfo['id'], 'console', '1-29', 'IOIOI', '');
2869 $sw_version = preg_replace ('/^Arista Networks EOS version (.+) running on .*$/', '\\1', $sysDescr);
2870 updateStickerForCell ($objectInfo, 5, $sw_version);
f31831d4
DO
2871 if (strlen ($serialNo = $device->snmpget ('mib-2.47.1.1.1.1.11.1'))) # entPhysicalSerialNumber.1
2872 updateStickerForCell ($objectInfo, 1, str_replace ('"', '', substr ($serialNo, strlen ('STRING: '))));
2ea5fd28 2873 break;
a3520e4c
DO
2874 case preg_match ('/^119\.1\.203\.2\.2\./', $sysObjectID): # NEC
2875 checkPIC ('1-681');
2876 commitAddPort ($objectInfo['id'], 'console 0', '1-681', 'console', '');
2877 checkPIC ('1-16');
2878 commitAddPort ($objectInfo['id'], 'PS1', '1-16', '', '');
2879 commitAddPort ($objectInfo['id'], 'PS2', '1-16', '', '');
2880 break;
24ae7cd1
DO
2881 case preg_match ('/^26543\.1\.7\./', $sysObjectID): # IBM
2882 checkPIC ('1-29');
2883 commitAddPort ($objectInfo['id'], 'console', '1-29', '', ''); # RJ-45 RS-232 console
2884 break;
7d69a266 2885 default: // Nortel...
74aee2dc
DO
2886 break;
2887 }
56a797ef 2888 $ifInfo = array();
92df4b0e 2889 foreach ($device->snmpwalkoid ($ifDescr_tablename) as $oid => $value)
56a797ef 2890 {
92df4b0e 2891 $randomindex = preg_replace ("/^.*${ifDescr_tablename}\.(.+)\$/", '\\1', $oid);
5f2354ce 2892 $value = trim (preg_replace ('/^[^:]+: (.+)$/', '\\1', $value), '"');
92df4b0e 2893 $ifInfo[$randomindex]['ifDescr'] = $value;
56a797ef 2894 }
92df4b0e 2895 foreach ($device->snmpwalkoid ('ifPhysAddress') as $oid => $value)
56a797ef 2896 {
92df4b0e 2897 $randomindex = preg_replace ("/^.*ifPhysAddress\.(.+)\$/", '\\1', $oid);
56a797ef
DO
2898 $value = trim ($value);
2899 // NET-SNMP may return MAC addresses in one of two (?) formats depending on
2900 // DISPLAY-HINT internal database. The best we can do about it is to accept both.
2901 // Bug originally reported by Walery Wysotsky against openSUSE 11.0.
6a845dce 2902 if (preg_match ('/^string: [0-9a-f]{1,2}(:[0-9a-f]{1,2}){5}/i', $value)) // STRING: x:yy:z:xx:y:zz
56a797ef
DO
2903 {
2904 list ($dummy, $value) = explode (' ', $value);
2905 $addrbytes = explode (':', $value);
2906 foreach ($addrbytes as $bidx => $bytestr)
2907 if (strlen ($bytestr) == 1)
2908 $addrbytes[$bidx] = '0' . $bytestr;
2909 }
6a845dce 2910 elseif (preg_match ('/^hex-string:( [0-9a-f]{2}){6}/i', $value)) // Hex-STRING: xx yy zz xx yy zz
56a797ef 2911 $addrbytes = explode (' ', substr ($value, -17));
6a845dce
DO
2912 elseif (preg_match ('/22[0-9a-f]{12}22$/', bin2hex ($value))) // STRING: "??????"
2913 $addrbytes = array (substr (bin2hex ($value), -14, 12));
56a797ef
DO
2914 else
2915 continue; // martian format
92df4b0e 2916 $ifInfo[$randomindex]['ifPhysAddress'] = implode ('', $addrbytes);
56a797ef
DO
2917 }
2918 // process each interface only once regardless of how many processors we have to run
2919 foreach ($ifInfo as $iface)
2920 foreach ($known_switches[$sysObjectID]['processors'] as $processor_name)
2921 {
56a797ef 2922 $newname = preg_replace ($iftable_processors[$processor_name]['pattern'], $iftable_processors[$processor_name]['replacement'], $iface['ifDescr'], 1, $count);
1f54e1ba
DO
2923 if ($newname === NULL)
2924 {
8ab645cf 2925 showError ('PCRE pattern error, terminating');
1f54e1ba
DO
2926 break 2;
2927 }
56a797ef
DO
2928 if (!$count)
2929 continue; // try next processor on current port
2930 $newlabel = preg_replace ($iftable_processors[$processor_name]['pattern'], $iftable_processors[$processor_name]['label'], $iface['ifDescr'], 1, $count);
bdc91a5c 2931 checkPIC ($iftable_processors[$processor_name]['dict_key']);
73a9a0a0 2932 commitAddPort ($objectInfo['id'], $newname, $iftable_processors[$processor_name]['dict_key'], $newlabel, $iface['ifPhysAddress']);
56a797ef
DO
2933 if (!$iftable_processors[$processor_name]['try_next_proc']) // done with this port
2934 continue 2;
2935 }
8536e20a 2936 // No failure up to this point, thus leave current tab for the "Ports" one.
8ab645cf 2937 return buildRedirectURL (NULL, 'ports');
74aee2dc
DO
2938}
2939
7b2a1a90 2940function doPDUSNMPmining ($objectInfo, $switch)
38e05b77 2941{
29de85b6 2942 global $known_APC_SKUs;
29de85b6
DO
2943 if (FALSE !== ($dict_key = array_search ($switch->getHWModel(), $known_APC_SKUs)))
2944 updateStickerForCell ($objectInfo, 2, $dict_key);
2945 updateStickerForCell ($objectInfo, 1, $switch->getHWSerial());
4848a7e3 2946 updateStickerForCell ($objectInfo, 3, $switch->getName());
29de85b6 2947 updateStickerForCell ($objectInfo, 5, $switch->getFWRev());
bdc91a5c 2948 checkPIC ('1-16');
29de85b6 2949 commitAddPort ($objectInfo['id'], 'input', '1-16', 'input', '');
4848a7e3
DO
2950 $portno = 1;
2951 foreach ($switch->getPorts() as $name => $port)
29de85b6
DO
2952 {
2953 $label = mb_strlen ($port[0]) ? $port[0] : $portno;
bdc91a5c 2954 checkPIC ('1-1322');
29de85b6
DO
2955 commitAddPort ($objectInfo['id'], $portno, '1-1322', $port[0], '');
2956 $portno++;
2957 }
8ab645cf
AA
2958 showSuccess ("Added ${portno} port(s)");
2959 return buildRedirectURL (NULL, 'ports');
38e05b77
DO
2960}
2961
4848a7e3 2962// APC SNMP code by Russ Garrett
38e05b77
DO
2963define('APC_STATUS_ON', 1);
2964define('APC_STATUS_OFF', 2);
2965define('APC_STATUS_REBOOT', 3);
2966
db5d7da5
AD
2967class RTSNMPDevice
2968{
2969 protected $snmp;
2970
2971 function __construct($hostname, $snmpsetup)
2972 {
2973 switch($snmpsetup['version']) {
2974 case 1:
2975 default:
2976 $this->snmp = new RTSNMPv1($hostname, $snmpsetup);
2977 break;
2978 case 2:
2979 $this->snmp = new RTSNMPv2($hostname, $snmpsetup);
2980 break;
2981 case 3:
2982 $this->snmp = new RTSNMPv3($hostname, $snmpsetup);
2983 break;
2984 }
8228bdb4 2985 }
38e05b77 2986
db5d7da5
AD
2987 function getName()
2988 {
2989 return $this->getString('sysName.0');
2990 }
92cfa92a 2991
db5d7da5
AD
2992 function getDescription()
2993 {
2994 return $this->getString('sysDescr.0');
2995 }
92cfa92a 2996
db5d7da5
AD
2997 function snmpget($oid)
2998 {
2999 return $this->snmp->snmpget($oid);
3000 }
92cfa92a 3001
db5d7da5
AD
3002 function snmpwalkoid($oid)
3003 {
3004 return $this->snmp->snmpwalkoid($oid);
3005 }
3006
3007 protected function snmpSet($oid, $type, $value)
3008 {
3009 return $this->snmp->snmpset($oid, $type, $value);
3010 }
3011
3012 protected function getString($oid)
3013 {
3014 return trim(str_replace('STRING: ', '', $this->snmp->snmpget($oid)), '"');
3015 }
8228bdb4
DO
3016}
3017
db5d7da5
AD
3018abstract class RTSNMP
3019{
3020 protected $hostname;
3021 protected $snmpsetup;
3022
3023 function __construct($hostname, $snmpsetup)
3024 {
3025 $this->hostname = $hostname;
3026 $this->snmpsetup = $snmpsetup;
3027 }
92cfa92a 3028
db5d7da5
AD
3029 abstract function snmpget($oid);
3030 abstract function snmpset($oid, $type, $value);
3031 abstract function snmpwalkoid($oid);
8228bdb4
DO
3032}
3033
db5d7da5
AD
3034class RTSNMPv1 extends RTSNMP
3035{
3036 function snmpget($oid)
3037 {
3038 return snmpget($this->hostname, $this->snmpsetup['community'], $oid);
3039 }
3040
3041 function snmpset($oid, $type, $value)
3042 {
3043 return snmpset($this->hostname, $this->snmpsetup['community'], $oid, $type, $value);
3044 }
92cfa92a 3045
db5d7da5
AD
3046 function snmpwalkoid($oid)
3047 {
3048 return snmpwalkoid($this->hostname, $this->snmpsetup['community'], $oid);
3049 }
8228bdb4
DO
3050}
3051
db5d7da5
AD
3052class RTSNMPv2 extends RTSNMP
3053{
3054 function snmpget($oid)
3055 {
3056 return snmp2_get($this->hostname, $this->snmpsetup['community'], $oid);
3057 }
3058
3059 function snmpset($oid, $type, $value)
3060 {
3061 return snmp2_set($this->hostname, $this->snmpsetup['community'], $oid, $type, $value);
3062 }
92cfa92a 3063
db5d7da5
AD
3064 function snmpwalkoid($oid)
3065 {
3066 return snmp2_real_walk($this->hostname, $this->snmpsetup['community'], $oid);
3067 }
047d6ee5
DO
3068}
3069
db5d7da5
AD
3070class RTSNMPv3 extends RTSNMP
3071{
3072 function snmpget($oid)
3073 {
3074 return snmp3_get($this->hostname, $this->snmpsetup['sec_name'], $this->snmpsetup['sec_level'], $this->snmpsetup['auth_protocol'], $this->snmpsetup['auth_passphrase'], $this->snmpsetup['priv_protocol'], $this->snmpsetup['priv_passphrase'], $oid);
3075 }
3076
3077 function snmpset($oid, $type, $value)
3078 {
3079 return snmp3_set($this->hostname, $this->snmpsetup['sec_name'], $this->snmpsetup['sec_level'], $this->snmpsetup['auth_protocol'], $this->snmpsetup['auth_passphrase'], $this->snmpsetup['priv_protocol'], $this->snmpsetup['priv_passphrase'], $oid, $type, $value);
3080 }
92cfa92a 3081
db5d7da5
AD
3082 function snmpwalkoid($oid)
3083 {
3084 return snmp3_real_walk($this->hostname, $this->snmpsetup['sec_name'], $this->snmpsetup['sec_level'], $this->snmpsetup['auth_protocol'], $this->snmpsetup['auth_passphrase'], $this->snmpsetup['priv_protocol'], $this->snmpsetup['priv_passphrase'], $oid);
3085 }
38e05b77
DO
3086}
3087
db5d7da5
AD
3088class APCPowerSwitch extends RTSNMPDevice
3089{
3090 protected $snmpMib = 'SNMPv2-SMI::enterprises.318';
3091
3092 function getPorts()
3093 {
92cfa92a
AD
3094 $data = $this->snmpwalkoid("{$this->snmpMib}.1.1.12.3.3.1.1.2");
3095 $status = $this->snmpwalkoid("{$this->snmpMib}.1.1.12.3.3.1.1.4");
db5d7da5
AD
3096 $out = array();
3097 foreach ($data as $id => $d)
3e847fc8 3098 $out[] = array(trim(str_replace('STRING: ', '', $d), '"'), str_replace('INTEGER: ', '', $status[$id]));
db5d7da5
AD
3099 return $out;
3100 }
92cfa92a 3101
db5d7da5
AD
3102 function getPortStatus($id)
3103 {
3104 return trim($this->snmpget("{$this->snmpMib}.1.1.12.3.3.1.1.4.$id"), 'INTEGER: ');
3105 }
3106
3107 function getPortName($id)
3108 {
3109 return trim(str_replace('STRING: ', '', $this->snmpget("{$this->snmpMib}.1.1.12.3.3.1.1.2.$id")), '"');
3110 }
3111
3112 function setPortName($id, $name)
3113 {
3114 return $this->snmpset("{$this->snmpMib}.1.1.4.5.2.1.3.$id", 's', $name);
3115 }
3116
3117 function portOff($id)
3118 {
3119 return $this->snmpSet("{$this->snmpMib}.1.1.12.3.3.1.1.4.$id", 'i', APC_STATUS_OFF);
3120 }
3121
3122 function portOn($id)
3123 {
3124 return $this->snmpSet("{$this->snmpMib}.1.1.12.3.3.1.1.4.$id", 'i', APC_STATUS_ON);
3125 }
3126
3127 function portReboot($id)
3128 {
3129 return $this->snmpSet("{$this->snmpMib}.1.1.12.3.3.1.1.4.$id", 'i', APC_STATUS_REBOOT);
3130 }
3131
30ad8bc4
DO
3132 // rPDUIdentFirmwareRev.0 == .1.3.6.1.4.1.318.1.1.12.1.3.0 = STRING: "vN.N.N"
3133 function getFWRev()
3134 {
8228bdb4 3135 return preg_replace ('/^STRING: "(.+)"$/', '\\1', $this->snmpget ("{$this->snmpMib}.1.1.12.1.3.0"));
30ad8bc4 3136 }
db5d7da5 3137
30ad8bc4
DO
3138 // rPDUIdentSerialNumber.0 == .1.3.6.1.4.1.318.1.1.12.1.6.0 = STRING: "XXXXXXXXXXX"
3139 function getHWSerial()
3140 {
8228bdb4 3141 return preg_replace ('/^STRING: "(.+)"$/', '\\1', $this->snmpget ("{$this->snmpMib}.1.1.12.1.6.0"));
30ad8bc4 3142 }
db5d7da5 3143
30ad8bc4
DO
3144 // rPDUIdentModelNumber.0 == .1.3.6.1.4.1.318.1.1.12.1.5.0 = STRING: "APnnnn"
3145 function getHWModel()
3146 {
8228bdb4 3147 return preg_replace ('/^STRING: "(.*)"$/', '\\1', $this->snmpget ("{$this->snmpMib}.1.1.12.1.5.0"));
30ad8bc4 3148 }
38e05b77 3149}
367fcba0 3150
2d511052
DO
3151// Take address in the form XX:XX:XX:XX:XX:XX and return the next
3152// address in the same form.
3153function nextMACAddress ($addr)
3154{
cc000fab
DO
3155 if ($addr == '')
3156 return '';
2d511052
DO
3157 $bytes = array();
3158 foreach (explode (':', $addr) as $hex)
3159 $bytes[] = hexdec ($hex);
3160 for ($i = 5; $i >= 0; $i--)
3161 {
3162 $bytes[$i] += 1;
3163 if ($bytes[$i] <= 255) // FF
3164 break; // no roll over
3165 $bytes[$i] = 0;
3166 }
3167 foreach (array_keys ($bytes) as $key)
3168 $bytes[$key] = sprintf ('%02X', $bytes[$key]);
3169 return implode (':', $bytes);
3170}
3171
3172function generatePortsForCatModule ($object_id, $slotno = 1, $mtype = 'X6748', $mac_address = '')
3173{
3174 global $dbxlink;
3175 $mac_address = l2addressFromDatabase (l2addressForDatabase ($mac_address));
3176 switch ($mtype)
3177 {
cc000fab 3178 case 'WS-X6748-GE-TX':
2d511052
DO
3179 $dbxlink->beginTransaction();
3180 for ($i = 1; $i <= 48; $i++)
3181 {
73a9a0a0 3182 commitAddPort ($object_id, "gi${slotno}/${i}", '1-24', "slot ${slotno} port ${i}", $mac_address);
cc000fab 3183 $mac_address = nextMACAddress ($mac_address);
2d511052
DO
3184 }
3185 $dbxlink->commit();
3186 break;
cc000fab
DO
3187 case 'WS-X6708-10GE':
3188 for ($i = 1; $i <= 8; $i++)
3189 {
3190 commitAddPort ($object_id, "te${slotno}/${i}", '6-1080', "slot ${slotno} port ${i}", $mac_address);
3191 $mac_address = nextMACAddress ($mac_address);
3192 }
3193 break;
8fe2d6f0
DO
3194 case 'WS-X6704-10GE':
3195 for ($i = 1; $i <= 4; $i++)
3196 {
3197 commitAddPort ($object_id, "te${slotno}/${i}", '5-1079', "slot ${slotno} port ${i}", $mac_address);
3198 $mac_address = nextMACAddress ($mac_address);
3199 }
3200 break;
cc000fab
DO
3201 case 'VS-S720-10G':
3202 commitAddPort ($object_id, "gi${slotno}/1", '4-1077', "slot ${slotno} port 1", $mac_address);
3203 $mac_address = nextMACAddress ($mac_address);
3204 commitAddPort ($object_id, "gi${slotno}/2", '4-1077', "slot ${slotno} port 2", $mac_address);
3205 $mac_address = nextMACAddress ($mac_address);
3206 commitAddPort ($object_id, "gi${slotno}/3", '1-24', "slot ${slotno} port 3", $mac_address);
3207 $mac_address = nextMACAddress ($mac_address);
3208 commitAddPort ($object_id, "te${slotno}/4", '6-1080', "slot ${slotno} port 4", $mac_address);
3209 $mac_address = nextMACAddress ($mac_address);
3210 commitAddPort ($object_id, "te${slotno}/5", '6-1080', "slot ${slotno} port 5", $mac_address);
3211 break;
3e34adae
DO
3212 case '3750G-24TS':
3213 // MAC address of 1st port is the next one after switch's address
cc000fab 3214 $mac_address = nextMACAddress ($mac_address);
3e34adae
DO
3215 for ($i = 1; $i <= 24; $i++)
3216 {
3217 commitAddPort ($object_id, "gi${slotno}/0/${i}", '1-24', "unit ${slotno} port ${i}", $mac_address);
cc000fab 3218 $mac_address = nextMACAddress ($mac_address);
3e34adae
DO
3219 }
3220 for ($i = 25; $i <= 28; $i++)
3221 {
3222 commitAddPort ($object_id, "gi${slotno}/0/${i}", '4-1077', "unit ${slotno} port ${i}", $mac_address);
abd1e9ac
DO
3223 $mac_address = nextMACAddress ($mac_address);
3224 }
3225 break;
3226 case '3750G-24T':
3227 $mac_address = nextMACAddress ($mac_address);
3228 for ($i = 1; $i <= 24; $i++)
3229 {
3230 commitAddPort ($object_id, "gi${slotno}/0/${i}", '1-24', "unit ${slotno} port ${i}", $mac_address);
cc000fab 3231 $mac_address = nextMACAddress ($mac_address);
3e34adae
DO
3232 }
3233 break;
d423bb7d
DO
3234 case '3750G-16TD':
3235 $mac_address = nextMACAddress ($mac_address);
3236 for ($i = 1; $i <= 16; $i++)
3237 {
3238 commitAddPort ($object_id, "gi${slotno}/0/${i}", '1-24', "unit ${slotno} port ${i}", $mac_address);
3239 $mac_address = nextMACAddress ($mac_address);
3240 }
3241 commitAddPort ($object_id, "te${slotno}/0/1", '5-1079', "unit ${slotno} port ${i}", $mac_address);
3242 break;
c5553818
DO
3243 case 'LE02G48TA':
3244 for ($i = 0; $i <= 47; $i++)
3245 commitAddPort ($object_id, "gi${slotno}/0/${i}", '1-24', "slot ${slotno} port ${i}", $mac_address);
3246 break;
3247 case 'LE02X12SA':
3248 for ($i = 0; $i <= 11; $i++)
3249 commitAddPort ($object_id, "gi${slotno}/0/${i}", '9-1084', "slot ${slotno} port ${i}", $mac_address);
3250 break;
2d511052
DO
3251 }
3252}
3253
1f54e1ba
DO
3254function detectSoftwareType ($objectInfo, $sysDescr)
3255{
3256 global $swtype_pcre;
3257 foreach ($swtype_pcre as $pattern => $dict_key)
3258 if (preg_match ($pattern, $sysDescr))
3259 {
3260 updateStickerForCell ($objectInfo, 4, $dict_key);
3261 return;
3262 }
3263}
2ffd5a2a 3264?>