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