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