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