1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
|
/* packet-lmp.c
* Routines for LMP packet disassembly
*
* (c) Copyright Ashok Narayanan <ashokn@cisco.com>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
/*
* Code for dissecting the Link Management Protocol (LMP). The latest LMP
* specification is in draft-ieft-ccamp-lmp-10.txt. This version also includes
* support for dissecting LMP service discovery extensions defined in the
* UNI 1.0 specification.
*
* Support for LMP service discovery extensions added by Manu Pathak
* (mapathak@cisco.com), June 2005.
*
* Support for RFC4207 (SONET/SDH encoding for LMP test messages) added
* by Roberto Morro (roberto.morro [AT] tilab.com), August 2007
*
* Support for (provisional) oif-p0040.010.006 added by Roberto Morro,
* August 2007
*/
#include "config.h"
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/in_cksum.h>
#include <epan/expert.h>
#include <epan/to_str.h>
#include <epan/tfs.h>
#include <epan/unit_strings.h>
#include <wsutil/array.h>
#include "packet-rsvp.h"
void proto_register_lmp(void);
void proto_reg_handoff_lmp(void);
static int proto_lmp;
#define UDP_PORT_LMP_DEFAULT 701
static bool lmp_checksum_config;
static dissector_handle_t lmp_handle;
/*----------------------------------------------------------------------
* LMP message types
*/
typedef enum {
LMP_MSG_CONFIG=1,
LMP_MSG_CONFIG_ACK,
LMP_MSG_CONFIG_NACK,
LMP_MSG_HELLO,
LMP_MSG_BEGIN_VERIFY,
LMP_MSG_BEGIN_VERIFY_ACK,
LMP_MSG_BEGIN_VERIFY_NACK,
LMP_MSG_END_VERIFY,
LMP_MSG_END_VERIFY_ACK,
LMP_MSG_TEST,
LMP_MSG_TEST_STATUS_SUCCESS,
LMP_MSG_TEST_STATUS_FAILURE,
LMP_MSG_TEST_STATUS_ACK,
LMP_MSG_LINK_SUMMARY,
LMP_MSG_LINK_SUMMARY_ACK,
LMP_MSG_LINK_SUMMARY_NACK,
LMP_MSG_CHANNEL_STATUS,
LMP_MSG_CHANNEL_STATUS_ACK,
LMP_MSG_CHANNEL_STATUS_REQ,
LMP_MSG_CHANNEL_STATUS_RESP,
LMP_MSG_TRACE_MONITOR,
LMP_MSG_TRACE_MONITOR_ACK,
LMP_MSG_TRACE_MONITOR_NACK,
LMP_MSG_TRACE_MISMATCH,
LMP_MSG_TRACE_MISMATCH_ACK,
LMP_MSG_TRACE_REQUEST,
LMP_MSG_TRACE_REPORT,
LMP_MSG_TRACE_REQUEST_NACK,
LMP_MSG_INSERT_TRACE,
LMP_MSG_INSERT_TRACE_ACK,
LMP_MSG_INSERT_TRACE_NACK,
LMP_MSG_SERVICE_CONFIG=50,
LMP_MSG_SERVICE_CONFIG_ACK,
LMP_MSG_SERVICE_CONFIG_NACK,
LMP_MSG_DISCOVERY_RESP=241,
LMP_MSG_DISCOVERY_RESP_ACK,
LMP_MSG_DISCOVERY_RESP_NACK
} lmp_message_types;
static const value_string message_type_vals[] = {
{LMP_MSG_CONFIG, "Config Message. "},
{LMP_MSG_CONFIG_ACK, "ConfigAck Message. "},
{LMP_MSG_CONFIG_NACK, "ConfigNack Message. "},
{LMP_MSG_HELLO, "Hello Message. "},
{LMP_MSG_BEGIN_VERIFY, "BeginVerify Message. "},
{LMP_MSG_BEGIN_VERIFY_ACK, "BeginVerifyAck Message. "},
{LMP_MSG_BEGIN_VERIFY_NACK, "BeginVerifyNack Message. "},
{LMP_MSG_END_VERIFY, "EndVerify Message. "},
{LMP_MSG_END_VERIFY_ACK, "EndVerifyAck Message. "},
{LMP_MSG_TEST, "Test Message. "},
{LMP_MSG_TEST_STATUS_SUCCESS, "TestStatusSuccess Message. "},
{LMP_MSG_TEST_STATUS_FAILURE, "TestStatusFailure Message. "},
{LMP_MSG_TEST_STATUS_ACK, "TestStatusAck Message. "},
{LMP_MSG_LINK_SUMMARY, "LinkSummary Message. "},
{LMP_MSG_LINK_SUMMARY_ACK, "LinkSummaryAck Message. "},
{LMP_MSG_LINK_SUMMARY_NACK, "LinkSummaryNack Message. "},
{LMP_MSG_CHANNEL_STATUS, "ChannelStatus Message. "},
{LMP_MSG_CHANNEL_STATUS_ACK, "ChannelStatusAck Message. "},
{LMP_MSG_CHANNEL_STATUS_REQ, "ChannelStatusRequest Message. "},
{LMP_MSG_CHANNEL_STATUS_RESP, "ChannelStatusResponse Message. "},
{LMP_MSG_TRACE_MONITOR, "TraceMonitor Message. "},
{LMP_MSG_TRACE_MONITOR_ACK, "TraceMonitorAck Message. "},
{LMP_MSG_TRACE_MONITOR_NACK, "TraceMonitorNack Message. "},
{LMP_MSG_TRACE_MISMATCH, "TraceMismatch Message. "},
{LMP_MSG_TRACE_MISMATCH_ACK, "TraceMismatchAck Message. "},
{LMP_MSG_TRACE_REQUEST, "TraceRequest Message. "},
{LMP_MSG_TRACE_REPORT, "TraceReport Message. "},
{LMP_MSG_TRACE_REQUEST_NACK, "TraceReportNack Message. "},
{LMP_MSG_INSERT_TRACE, "InsertTrace Message. "},
{LMP_MSG_INSERT_TRACE_ACK, "InsertTraceAck Message. "},
{LMP_MSG_INSERT_TRACE_NACK, "InsertTraceNack Message. "},
{LMP_MSG_SERVICE_CONFIG, "ServiceConfig Message. "},
{LMP_MSG_SERVICE_CONFIG_ACK, "ServiceConfigAck Message. "},
{LMP_MSG_SERVICE_CONFIG_NACK, "ServiceConfigNack Message. "},
{LMP_MSG_DISCOVERY_RESP, "DiscoveryResponse Message. "},
{LMP_MSG_DISCOVERY_RESP_ACK, "DiscoveryResponseAck Message. "},
{LMP_MSG_DISCOVERY_RESP_NACK, "DiscoveryResponseNack Message. "},
{0, NULL}
};
/*------------------------------------------------------------------------------
* LMP object classes
*/
#define LMP_CLASS_NULL 0
#define LMP_CLASS_CCID 1
#define LMP_CLASS_NODE_ID 2
#define LMP_CLASS_LINK_ID 3
#define LMP_CLASS_INTERFACE_ID 4
#define LMP_CLASS_MESSAGE_ID 5
#define LMP_CLASS_CONFIG 6
#define LMP_CLASS_HELLO 7
#define LMP_CLASS_BEGIN_VERIFY 8
#define LMP_CLASS_BEGIN_VERIFY_ACK 9
#define LMP_CLASS_VERIFY_ID 10
#define LMP_CLASS_TE_LINK 11
#define LMP_CLASS_DATA_LINK 12
#define LMP_CLASS_CHANNEL_STATUS 13
#define LMP_CLASS_CHANNEL_STATUS_REQUEST 14
#define LMP_LAST_CONTIGUOUS_CLASS LMP_CLASS_CHANNEL_STATUS_REQUEST
#define LMP_CLASS_ERROR 20
#define LMP_CLASS_TRACE 21
#define LMP_CLASS_TRACE_REQ 22
#define LMP_CLASS_SERVICE_CONFIG 51
#define LMP_CLASS_DA_DCN_ADDRESS 248
#define LMP_CLASS_LOCAL_LAD_INFO 249
#define LMP_CLASS_MAX 250
static const value_string lmp_class_vals[] = {
{LMP_CLASS_CCID, "CCID"},
{LMP_CLASS_NODE_ID, "NODE_ID"},
{LMP_CLASS_LINK_ID, "LINK_ID"},
{LMP_CLASS_INTERFACE_ID, "INTERFACE_ID"},
{LMP_CLASS_MESSAGE_ID, "MESSAGE_ID"},
{LMP_CLASS_CONFIG, "CONFIG"},
{LMP_CLASS_HELLO, "HELLO"},
{LMP_CLASS_BEGIN_VERIFY, "BEGIN_VERIFY"},
{LMP_CLASS_BEGIN_VERIFY_ACK, "BEGIN_VERIFY_ACK"},
{LMP_CLASS_VERIFY_ID, "VERIFY_ID"},
{LMP_CLASS_TE_LINK, "TE_LINK"},
{LMP_CLASS_DATA_LINK, "DATA_LINK"},
{LMP_CLASS_CHANNEL_STATUS, "CHANNEL_STATUS"},
{LMP_CLASS_CHANNEL_STATUS_REQUEST, "CHANNEL_STATUS_REQUEST"},
{LMP_CLASS_ERROR, "ERROR"},
{LMP_CLASS_TRACE, "TRACE"},
{LMP_CLASS_TRACE_REQ, "TRACE_REQ"},
{LMP_CLASS_SERVICE_CONFIG, "SERVICE_CONFIG"},
{LMP_CLASS_DA_DCN_ADDRESS, "DA_DCN_ADDRESS"},
{LMP_CLASS_LOCAL_LAD_INFO, "LOCAL_LAD_INFO"},
{0, NULL}
};
/*------------------------------------------------------------------------------
* Other constants & stuff
*/
/* Channel Status */
static const value_string channel_status_str[] = {
{1, "Signal Okay (OK)"},
{2, "Signal Degraded (SD)"},
{3, "Signal Failed (SF)"},
{0, NULL}
};
static const value_string channel_status_short_str[] = {
{1, "OK"},
{2, "SD"},
{3, "SF"},
{0, NULL}
};
/* Service Discovery Client ServiceConfig object (defined in UNI 1.0) */
/* Client Port-Level Service Attribute Object */
/* Link Type */
static const value_string service_attribute_link_type_str[] = {
{5, "SDH ITU-T G.707"},
{6, "SONET ANSI T1.105"},
{0, NULL}
};
/* Signal Types for SDH */
static const value_string service_attribute_signal_types_sdh_str[] = {
{5, "VC-3"},
{6, "VC-4"},
{7, "STM-0"},
{8, "STM-1"},
{9, "STM-4"},
{10, "STM-16"},
{11, "STM-64"},
{12, "STM-256"},
{0, NULL}
};
/* Signal Types for SONET */
static const value_string service_attribute_signal_types_sonet_str[] = {
{5, "STS-1 SPE"},
{6, "STS-3c SPE"},
{7, "STS-1"},
{8, "STS-3"},
{9, "STS-12"},
{10, "STS-48"},
{11, "STS-192"},
{12, "STS-768"},
{0, NULL}
};
/* Trace type */
static const value_string lmp_trace_type_str[] = {
{ 1, "SONET Section Trace (J0 Byte)"},
{ 2, "SONET Path Trace (J1 Byte)"},
{ 3, "SONET Path Trace (J2 Byte)"},
{ 4, "SDH Section Trace (J0 Byte)"},
{ 5, "SDH Path Trace (J1 Byte)"},
{ 6, "SDH Path Trace (J2 Byte)"},
{ 0, NULL}
};
/*
* These values are used by the code that handles the Service Discovery
* Client Port-Level Service Attributes Object.
*/
#define LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SDH 5
#define LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SONET 6
/*------------------------------------------------------------------------------
* LMP Filter values
*/
enum hf_lmp_filter_keys {
/* Message types ---------------- */
LMPF_MSG,
LMPF_MSG_CONFIG,
LMPF_MSG_CONFIG_ACK,
LMPF_MSG_CONFIG_NACK,
LMPF_MSG_HELLO,
LMPF_MSG_BEGIN_VERIFY,
LMPF_MSG_BEGIN_VERIFY_ACK,
LMPF_MSG_BEGIN_VERIFY_NACK,
LMPF_MSG_END_VERIFY,
LMPF_MSG_END_VERIFY_ACK,
LMPF_MSG_TEST,
LMPF_MSG_TEST_STATUS_SUCCESS,
LMPF_MSG_TEST_STATUS_FAILURE,
LMPF_MSG_TEST_STATUS_ACK,
LMPF_MSG_LINK_SUMMARY,
LMPF_MSG_LINK_SUMMARY_ACK,
LMPF_MSG_LINK_SUMMARY_NACK,
LMPF_MSG_CHANNEL_STATUS,
LMPF_MSG_CHANNEL_STATUS_ACK,
LMPF_MSG_CHANNEL_STATUS_REQ,
LMPF_MSG_CHANNEL_STATUS_RESP,
LMPF_MSG_TRACE_MONITOR,
LMPF_MSG_TRACE_MONITOR_ACK,
LMPF_MSG_TRACE_MONITOR_NACK,
LMPF_MSG_TRACE_MISMATCH,
LMPF_MSG_TRACE_MISMATCH_ACK,
LMPF_MSG_TRACE_REQUEST,
LMPF_MSG_TRACE_REPORT,
LMPF_MSG_TRACE_REQUEST_NACK,
LMPF_MSG_INSERT_TRACE,
LMPF_MSG_INSERT_TRACE_ACK,
LMPF_MSG_INSERT_TRACE_NACK,
LMPF_MSG_SERVICE_CONFIG,
LMPF_MSG_SERVICE_CONFIG_ACK,
LMPF_MSG_SERVICE_CONFIG_NACK,
LMPF_MSG_DISCOVERY_RESP,
LMPF_MSG_DISCOVERY_RESP_ACK,
LMPF_MSG_DISCOVERY_RESP_NACK,
LMPF_MSG_MAX,
/* LMP Message Header Fields ------------------ */
LMPF_HDR_FLAGS,
LMPF_HDR_FLAGS_CC_DOWN,
LMPF_HDR_FLAGS_REBOOT,
/* LMP Object Class Filters -------------------- */
LMPF_OBJECT,
LMPF_CLASS_CCID,
LMPF_CLASS_NODE_ID,
LMPF_CLASS_LINK_ID,
LMPF_CLASS_INTERFACE_ID,
LMPF_CLASS_MESSAGE_ID,
LMPF_CLASS_CONFIG,
LMPF_CLASS_HELLO,
LMPF_CLASS_BEGIN_VERIFY,
LMPF_CLASS_BEGIN_VERIFY_ACK,
LMPF_CLASS_VERIFY_ID,
LMPF_CLASS_TE_LINK,
LMPF_CLASS_DATA_LINK,
LMPF_CLASS_CHANNEL_STATUS,
LMPF_CLASS_CHANNEL_STATUS_REQUEST,
LMPF_CLASS_ERROR,
LMPF_CLASS_TRACE,
LMPF_CLASS_TRACE_REQ,
LMPF_CLASS_SERVICE_CONFIG,
LMPF_CLASS_DA_DCN_ADDRESS,
LMPF_CLASS_LOCAL_LAD_INFO,
LMPF_VAL_CTYPE,
LMPF_VAL_LOCAL_CCID,
LMPF_VAL_REMOTE_CCID,
LMPF_VAL_LOCAL_NODE_ID,
LMPF_VAL_REMOTE_NODE_ID,
LMPF_VAL_LOCAL_LINK_ID_IPV4,
LMPF_VAL_LOCAL_LINK_ID_IPV6,
LMPF_VAL_LOCAL_LINK_ID_UNNUM,
LMPF_VAL_REMOTE_LINK_ID_IPV4,
LMPF_VAL_REMOTE_LINK_ID_IPV6,
LMPF_VAL_REMOTE_LINK_ID_UNNUM,
LMPF_VAL_LOCAL_INTERFACE_ID_IPV4,
LMPF_VAL_LOCAL_INTERFACE_ID_IPV6,
LMPF_VAL_LOCAL_INTERFACE_ID_UNNUM,
LMPF_VAL_REMOTE_INTERFACE_ID_IPV4,
LMPF_VAL_REMOTE_INTERFACE_ID_IPV6,
LMPF_VAL_REMOTE_INTERFACE_ID_UNNUM,
LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV4,
LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV6,
LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_UNNUM,
LMPF_VAL_MESSAGE_ID,
LMPF_VAL_MESSAGE_ID_ACK,
LMPF_VAL_CONFIG_HELLO,
LMPF_VAL_CONFIG_HELLO_DEAD,
LMPF_VAL_HELLO_TXSEQ,
LMPF_VAL_HELLO_RXSEQ,
LMPF_VAL_BEGIN_VERIFY_FLAGS,
LMPF_VAL_BEGIN_VERIFY_FLAGS_ALL_LINKS,
LMPF_VAL_BEGIN_VERIFY_FLAGS_LINK_TYPE,
LMPF_VAL_BEGIN_VERIFY_INTERVAL,
LMPF_VAL_BEGIN_VERIFY_ENCTYPE,
LMPF_VAL_BEGIN_VERIFY_TRANSPORT,
LMPF_VAL_BEGIN_VERIFY_TRANSMISSION_RATE,
LMPF_VAL_BEGIN_VERIFY_WAVELENGTH,
LMPF_VAL_VERIFY_ID,
LMPF_VAL_TE_LINK_FLAGS,
LMPF_VAL_TE_LINK_FLAGS_FAULT_MGMT,
LMPF_VAL_TE_LINK_FLAGS_LINK_VERIFY,
LMPF_VAL_TE_LINK_LOCAL_IPV4,
LMPF_VAL_TE_LINK_LOCAL_IPV6,
LMPF_VAL_TE_LINK_LOCAL_UNNUM,
LMPF_VAL_TE_LINK_REMOTE_IPV4,
LMPF_VAL_TE_LINK_REMOTE_IPV6,
LMPF_VAL_TE_LINK_REMOTE_UNNUM,
LMPF_VAL_DATA_LINK_FLAGS,
LMPF_VAL_DATA_LINK_FLAGS_PORT,
LMPF_VAL_DATA_LINK_FLAGS_ALLOCATED,
LMPF_VAL_DATA_LINK_LOCAL_IPV4,
LMPF_VAL_DATA_LINK_LOCAL_IPV6,
LMPF_VAL_DATA_LINK_LOCAL_UNNUM,
LMPF_VAL_DATA_LINK_REMOTE_IPV4,
LMPF_VAL_DATA_LINK_REMOTE_IPV6,
LMPF_VAL_DATA_LINK_REMOTE_UNNUM,
LMPF_VAL_DATA_LINK_SUBOBJ,
LMPF_VAL_DATA_LINK_SUBOBJ_SWITCHING_TYPE,
LMPF_VAL_DATA_LINK_SUBOBJ_LSP_ENCODING,
LMPF_VAL_ERROR,
LMPF_VAL_ERROR_VERIFY_UNSUPPORTED_LINK,
LMPF_VAL_ERROR_VERIFY_UNWILLING,
LMPF_VAL_ERROR_VERIFY_TRANSPORT,
LMPF_VAL_ERROR_VERIFY_TE_LINK_ID,
LMPF_VAL_ERROR_VERIFY_UNKNOWN_CTYPE,
LMPF_VAL_ERROR_SUMMARY_BAD_PARAMETERS,
LMPF_VAL_ERROR_SUMMARY_RENEGOTIATE,
LMPF_VAL_ERROR_SUMMARY_BAD_TE_LINK,
LMPF_VAL_ERROR_SUMMARY_BAD_DATA_LINK,
LMPF_VAL_ERROR_SUMMARY_UNKNOWN_TEL_CTYPE,
LMPF_VAL_ERROR_SUMMARY_UNKNOWN_DL_CTYPE,
LMPF_VAL_ERROR_SUMMARY_BAD_REMOTE_LINK_ID,
LMPF_VAL_ERROR_CONFIG_BAD_PARAMETERS,
LMPF_VAL_ERROR_CONFIG_RENEGOTIATE,
LMPF_VAL_ERROR_CONFIG_BAD_CCID,
LMPF_VAL_ERROR_TRACE_UNSUPPORTED_TYPE,
LMPF_VAL_ERROR_TRACE_INVALID_MSG,
LMPF_VAL_ERROR_TRACE_UNKNOWN_CTYPE,
LMPF_VAL_ERROR_LAD_AREA_ID_MISMATCH,
LMPF_VAL_ERROR_LAD_TCP_ID_MISMATCH,
LMPF_VAL_ERROR_LAD_DA_DCN_MISMATCH,
LMPF_VAL_ERROR_LAD_CAPABILITY_MISMATCH,
LMPF_VAL_ERROR_LAD_UNKNOWN_CTYPE,
LMPF_VAL_TRACE_LOCAL_TYPE,
LMPF_VAL_TRACE_LOCAL_LEN,
LMPF_VAL_TRACE_LOCAL_MSG,
LMPF_VAL_TRACE_REMOTE_TYPE,
LMPF_VAL_TRACE_REMOTE_LEN,
LMPF_VAL_TRACE_REMOTE_MSG,
LMPF_VAL_TRACE_REQ_TYPE,
LMPF_VAL_SERVICE_CONFIG_SP_FLAGS,
LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP,
LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP,
LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS,
LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD,
LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD,
LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD,
LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS,
LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED,
LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC,
LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC,
LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC,
LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC,
LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID,
LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS,
LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_SOH,
LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_LOH,
LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS,
LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED,
LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS,
LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE,
LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK,
LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG,
LMPF_VAL_LOCAL_DA_DCN_ADDR,
LMPF_VAL_REMOTE_DA_DCN_ADDR,
LMPF_VAL_LOCAL_LAD_INFO_NODE_ID,
LMPF_VAL_LOCAL_LAD_INFO_AREA_ID,
LMPF_VAL_LOCAL_LAD_INFO_TE_LINK_ID,
LMPF_VAL_LOCAL_LAD_INFO_COMPONENT_ID,
LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ID,
LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ADDR,
LMPF_VAL_LAD_INFO_SUBOBJ,
LMPF_VAL_LAD_INFO_SUBOBJ_PRI_AREA_ID,
LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ID,
LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ADDR,
LMPF_VAL_LAD_INFO_SUBOBJ_SEC_AREA_ID,
LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ID,
LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ADDR,
LMPF_VAL_LAD_INFO_SUBOBJ_SWITCHING_TYPE,
LMPF_VAL_LAD_INFO_SUBOBJ_LSP_ENCODING,
LMPF_CHECKSUM,
LMPF_CHECKSUM_STATUS,
LMPF_MAX
};
static int hf_lmp_filter[LMPF_MAX];
static int hf_lmp_data;
/* Generated from convert_proto_tree_add_text.pl */
static int hf_lmp_maximum_reservable_bandwidth;
static int hf_lmp_verify_transport_mechanism;
static int hf_lmp_interface_id_ipv6;
static int hf_lmp_minimum_reservable_bandwidth;
static int hf_lmp_object_length;
static int hf_lmp_interface_id_unnumbered;
static int hf_lmp_signal_types_sdh;
static int hf_lmp_link_type;
static int hf_lmp_number_of_data_links;
static int hf_lmp_version;
static int hf_lmp_interface_id_ipv4;
static int hf_lmp_header_length;
static int hf_lmp_uni_version;
static int hf_lmp_subobject_type;
static int hf_lmp_object_class;
static int hf_lmp_negotiable;
static int hf_lmp_signal_types_sonet;
static int hf_lmp_header_flags;
static int hf_lmp_verify_interval;
static int hf_lmp_wavelength;
static int hf_lmp_channel_status;
static int hf_lmp_verifydeadinterval;
static int hf_lmp_data_link_remote_id_ipv6;
static int hf_lmp_link;
static int hf_lmp_subobject_length;
static int hf_lmp_transmission_rate;
static int hf_lmp_verify_transport_response;
static int hf_lmp_data_link_local_id_ipv6;
static int hf_lmp_free_timeslots;
static expert_field ei_lmp_checksum_incorrect;
static expert_field ei_lmp_invalid_msg_type;
static expert_field ei_lmp_invalid_class;
static expert_field ei_lmp_trace_len;
static expert_field ei_lmp_obj_len;
static int
lmp_valid_class(int lmp_class)
{
/* Contiguous classes */
if (lmp_class > LMP_CLASS_NULL && lmp_class <= LMP_LAST_CONTIGUOUS_CLASS)
return 1;
/* Noncontiguous classes */
if (lmp_class == LMP_CLASS_ERROR ||
lmp_class == LMP_CLASS_TRACE ||
lmp_class == LMP_CLASS_TRACE_REQ ||
lmp_class == LMP_CLASS_SERVICE_CONFIG ||
lmp_class == LMP_CLASS_DA_DCN_ADDRESS ||
lmp_class == LMP_CLASS_LOCAL_LAD_INFO)
return 1;
return 0;
}
static int
lmp_msg_to_filter_num(int msg_type)
{
if (msg_type <= LMP_MSG_INSERT_TRACE_NACK)
return LMPF_MSG + msg_type;
switch (msg_type) {
case LMP_MSG_SERVICE_CONFIG:
return LMPF_MSG_SERVICE_CONFIG;
case LMP_MSG_SERVICE_CONFIG_ACK:
return LMPF_MSG_SERVICE_CONFIG_ACK;
case LMP_MSG_SERVICE_CONFIG_NACK:
return LMPF_MSG_SERVICE_CONFIG_NACK;
case LMP_MSG_DISCOVERY_RESP:
return LMPF_MSG_DISCOVERY_RESP;
case LMP_MSG_DISCOVERY_RESP_ACK:
return LMPF_MSG_DISCOVERY_RESP_ACK;
case LMP_MSG_DISCOVERY_RESP_NACK:
return LMPF_MSG_DISCOVERY_RESP_NACK;
default:
return -1;
}
}
static int
lmp_class_to_filter_num(int lmp_class)
{
/*
* The contiguous values can all be handled in the same way. The ERROR and
* Service Config objects, whose C-Type values are not contiguously assigned,
* must be handled separately.
*/
switch (lmp_class) {
case LMP_CLASS_CCID:
case LMP_CLASS_NODE_ID:
case LMP_CLASS_LINK_ID:
case LMP_CLASS_INTERFACE_ID:
case LMP_CLASS_MESSAGE_ID:
case LMP_CLASS_CONFIG:
case LMP_CLASS_HELLO:
case LMP_CLASS_BEGIN_VERIFY:
case LMP_CLASS_BEGIN_VERIFY_ACK:
case LMP_CLASS_VERIFY_ID:
case LMP_CLASS_TE_LINK:
case LMP_CLASS_DATA_LINK:
case LMP_CLASS_CHANNEL_STATUS:
case LMP_CLASS_CHANNEL_STATUS_REQUEST:
return LMPF_OBJECT + lmp_class;
case LMP_CLASS_ERROR:
return LMPF_CLASS_ERROR;
case LMP_CLASS_TRACE:
return LMPF_CLASS_TRACE;
case LMP_CLASS_TRACE_REQ:
return LMPF_CLASS_TRACE_REQ;
case LMP_CLASS_SERVICE_CONFIG:
return LMPF_CLASS_SERVICE_CONFIG;
case LMP_CLASS_DA_DCN_ADDRESS:
return LMPF_CLASS_DA_DCN_ADDRESS;
case LMP_CLASS_LOCAL_LAD_INFO:
return LMPF_CLASS_LOCAL_LAD_INFO;
default:
return -1;
}
}
/*------------------------------------------------------------------------------
* LMP Subtrees
*
* We have two types of subtrees - a statically defined, constant set and
* a class set - one for each class. The static ones are before all the class ones
*/
enum {
LMP_TREE_MAIN,
LMP_TREE_HEADER,
LMP_TREE_HEADER_FLAGS,
LMP_TREE_OBJECT_HEADER,
LMP_TREE_ERROR_FLAGS,
LMP_TREE_BEGIN_VERIFY_FLAGS,
LMP_TREE_BEGIN_VERIFY_TRANSPORT_FLAGS,
LMP_TREE_TE_LINK_FLAGS,
LMP_TREE_DATA_LINK_FLAGS,
LMP_TREE_DATA_LINK_SUBOBJ,
LMP_TREE_CHANNEL_STATUS_ID,
LMP_TREE_SERVICE_CONFIG_SP_FLAGS,
LMP_TREE_SERVICE_CONFIG_CPSA_TP_FLAGS,
LMP_TREE_SERVICE_CONFIG_CPSA_CCT_FLAGS,
LMP_TREE_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS,
LMP_TREE_SERVICE_CONFIG_NSA_TCM_FLAGS,
LMP_TREE_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS,
LMP_TREE_LAD_INFO_SUBOBJ,
LMP_TREE_CLASS_START
};
#define NUM_LMP_SUBTREES (LMP_TREE_CLASS_START + LMP_CLASS_MAX)
static int lmp_subtree[NUM_LMP_SUBTREES];
static int lmp_class_to_subtree(int lmp_class)
{
if (lmp_valid_class(lmp_class)) {
if (lmp_class == LMP_CLASS_SERVICE_CONFIG) {
return lmp_subtree[LMP_TREE_CLASS_START + LMP_CLASS_SERVICE_CONFIG];
}
if (lmp_class == LMP_CLASS_DA_DCN_ADDRESS) {
return lmp_subtree[LMP_TREE_CLASS_START + LMP_CLASS_DA_DCN_ADDRESS];
}
if (lmp_class == LMP_CLASS_LOCAL_LAD_INFO) {
return lmp_subtree[LMP_TREE_CLASS_START + LMP_CLASS_LOCAL_LAD_INFO];
}
return lmp_subtree[LMP_TREE_CLASS_START + lmp_class];
}
return -1;
}
static const true_false_string tfs_active_monitoring_not_allocated = { "Allocated - Active Monitoring", "Not Allocated" };
/*------------------------------------------------------------------------------
* Da code
*/
static int
dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
int offset = 0;
proto_tree *lmp_tree = NULL, *ti, *ti2;
proto_tree *lmp_header_tree;
proto_tree *lmp_object_tree;
proto_tree *lmp_object_header_tree;
proto_tree *lmp_subobj_tree;
proto_item *hidden_item, *msg_item;
uint8_t message_type;
vec_t cksum_vec[1];
int j, k, l, len;
int msg_length;
int obj_length;
int mylen;
int offset2;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LMP");
col_clear(pinfo->cinfo, COL_INFO);
message_type = tvb_get_uint8(tvb, offset+3);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(message_type, message_type_vals, "Unknown (%u). "));
if (tree) {
static int * const header_flags[] = {
&hf_lmp_filter[LMPF_HDR_FLAGS_CC_DOWN],
&hf_lmp_filter[LMPF_HDR_FLAGS_REBOOT],
NULL
};
msg_length = tvb_get_ntohs(tvb, offset+4);
ti = proto_tree_add_item(tree, proto_lmp, tvb, offset, msg_length, ENC_NA);
lmp_tree = proto_item_add_subtree(ti, lmp_subtree[LMP_TREE_MAIN]);
lmp_header_tree = proto_tree_add_subtree_format(
lmp_tree, tvb, offset, 12,
lmp_subtree[LMP_TREE_HEADER], NULL, "LMP Header. %s",
val_to_str(message_type, message_type_vals, "Unknown Message (%u). "));
proto_tree_add_item(lmp_header_tree, hf_lmp_version, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(lmp_header_tree, tvb, offset+2, hf_lmp_header_flags, lmp_subtree[LMP_TREE_HEADER_FLAGS], header_flags, ENC_NA);
msg_item = proto_tree_add_uint(lmp_header_tree, hf_lmp_filter[LMPF_MSG], tvb,
offset+3, 1, message_type);
proto_tree_add_uint_format_value(lmp_header_tree, hf_lmp_header_length, tvb, offset+4, 2, msg_length, "%d bytes",
msg_length);
/* if (LMPF_MSG + message_type < LMPF_MSG_MAX && message_type > 0) {*/
/* this "if" is still a hack, but compared to the former one at least correct */
if ((message_type >= LMP_MSG_CONFIG && message_type <= LMP_MSG_CHANNEL_STATUS_RESP) ||
(message_type >= LMP_MSG_SERVICE_CONFIG && message_type <= LMP_MSG_SERVICE_CONFIG_NACK) ||
(message_type >= LMP_MSG_DISCOVERY_RESP && message_type <= LMP_MSG_DISCOVERY_RESP_NACK) ) {
hidden_item = proto_tree_add_boolean(lmp_header_tree,
hf_lmp_filter[lmp_msg_to_filter_num(message_type)],
tvb, offset+3, 1, 1);
proto_item_set_hidden(hidden_item);
} else {
expert_add_info_format(pinfo, msg_item, &ei_lmp_invalid_msg_type,
"Invalid message type: %u", message_type);
return tvb_captured_length(tvb);
}
if (lmp_checksum_config) {
if (!pinfo->fragmented && (int) tvb_captured_length(tvb) >= msg_length) {
/* The packet isn't part of a fragmented datagram and isn't truncated, so we can checksum it. */
SET_CKSUM_VEC_TVB(cksum_vec[0], tvb, 0, msg_length);
proto_tree_add_checksum(lmp_header_tree, tvb, offset+6, hf_lmp_filter[LMPF_CHECKSUM], hf_lmp_filter[LMPF_CHECKSUM_STATUS], &ei_lmp_checksum_incorrect, pinfo,
in_cksum(cksum_vec, 1), ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY|PROTO_CHECKSUM_IN_CKSUM);
} else {
proto_tree_add_checksum(lmp_header_tree, tvb, offset+6, hf_lmp_filter[LMPF_CHECKSUM], hf_lmp_filter[LMPF_CHECKSUM_STATUS], &ei_lmp_checksum_incorrect, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
}
} else {
proto_tree_add_checksum(lmp_header_tree, tvb, offset+6, hf_lmp_filter[LMPF_CHECKSUM], hf_lmp_filter[LMPF_CHECKSUM_STATUS], &ei_lmp_checksum_incorrect, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NOT_PRESENT);
}
offset += 8;
len = 8;
while (len < msg_length) {
uint8_t lmp_class;
uint8_t type;
uint8_t negotiable;
int filter_num;
proto_item* trace_item;
obj_length = tvb_get_ntohs(tvb, offset+2);
if (obj_length == 0) {
proto_tree_add_expert(tree, pinfo, &ei_lmp_obj_len, tvb, offset+2, 2);
break;
}
lmp_class = tvb_get_uint8(tvb, offset+1);
type = tvb_get_uint8(tvb, offset);
negotiable = (type >> 7); type &= 0x7f;
hidden_item = proto_tree_add_uint(lmp_tree, hf_lmp_filter[LMPF_OBJECT], tvb,
offset, 1, lmp_class);
proto_item_set_generated(hidden_item);
filter_num = lmp_class_to_filter_num(lmp_class);
if (filter_num != -1 && lmp_valid_class(lmp_class)) {
ti = proto_tree_add_item(lmp_tree,
hf_lmp_filter[filter_num],
tvb, offset, obj_length, ENC_NA); /* all possibilities are FT_NONE */
} else {
expert_add_info_format(pinfo, hidden_item, &ei_lmp_invalid_class,
"Invalid class: %u", lmp_class);
return tvb_captured_length(tvb);
}
lmp_object_tree = proto_item_add_subtree(ti, lmp_class_to_subtree(lmp_class));
lmp_object_header_tree = proto_tree_add_subtree_format(lmp_object_tree, tvb, offset, 4,
lmp_subtree[LMP_TREE_OBJECT_HEADER], &ti2,
"Header. Class %d, C-Type %d, Length %d, %s",
lmp_class, type, obj_length,
negotiable ? "Negotiable" : "Not Negotiable");
proto_tree_add_item(lmp_object_header_tree, hf_lmp_negotiable, tvb, offset, 1, ENC_NA);
proto_tree_add_item(lmp_object_header_tree, hf_lmp_object_length, tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_header_tree, hf_lmp_object_class, tvb, offset+1, 1, ENC_BIG_ENDIAN);
proto_tree_add_uint(lmp_object_header_tree, hf_lmp_filter[LMPF_VAL_CTYPE],
tvb, offset, 1, type);
offset2 = offset+4;
mylen = obj_length - 4;
switch (lmp_class) {
case LMP_CLASS_NULL:
break;
case LMP_CLASS_CCID:
switch(type) {
case 1:
l = LMPF_VAL_LOCAL_CCID;
proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 2:
l = LMPF_VAL_REMOTE_CCID;
proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_NODE_ID:
switch(type) {
case 1:
l = LMPF_VAL_LOCAL_NODE_ID;
proto_item_append_text(ti, ": %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 2:
l = LMPF_VAL_REMOTE_NODE_ID;
proto_item_append_text(ti, ": %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_LINK_ID:
switch(type) {
case 1:
case 2:
l = (type == 1)? LMPF_VAL_LOCAL_LINK_ID_IPV4:
LMPF_VAL_REMOTE_LINK_ID_IPV4;
proto_item_append_text(ti, ": IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 3:
case 4:
l = (type == 3)? LMPF_VAL_LOCAL_LINK_ID_IPV6:
LMPF_VAL_REMOTE_LINK_ID_IPV6;
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 16, ENC_NA);
break;
case 5:
case 6:
l = (type == 5)? LMPF_VAL_LOCAL_LINK_ID_UNNUM:
LMPF_VAL_REMOTE_LINK_ID_UNNUM;
proto_item_append_text(ti, ": Unnumbered %d",
tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_INTERFACE_ID:
switch(type) {
case 1:
case 2:
l = (type == 1)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV4:
LMPF_VAL_REMOTE_INTERFACE_ID_IPV4;
proto_item_append_text(ti, ": IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 3:
case 4:
l = (type == 3)? LMPF_VAL_LOCAL_INTERFACE_ID_IPV6:
LMPF_VAL_REMOTE_INTERFACE_ID_IPV6;
proto_item_append_text(ti, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 16, ENC_NA);
break;
case 5:
case 6:
l = (type == 5)? LMPF_VAL_LOCAL_INTERFACE_ID_UNNUM:
LMPF_VAL_REMOTE_INTERFACE_ID_UNNUM;
proto_item_append_text(ti, ": Unnumbered %d",
tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_MESSAGE_ID:
switch(type) {
case 1:
l = LMPF_VAL_MESSAGE_ID;
proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 2:
l = LMPF_VAL_MESSAGE_ID_ACK;
proto_item_append_text(ti, ": %d", tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[l], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_CONFIG:
switch(type) {
case 1:
proto_item_append_text(ti, ": HelloInterval: %d, HelloDeadInterval: %d",
tvb_get_ntohs(tvb, offset2),
tvb_get_ntohs(tvb, offset2+2));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_CONFIG_HELLO],
tvb, offset2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_CONFIG_HELLO_DEAD],
tvb, offset2+2, 2, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_HELLO:
switch(type) {
case 1:
proto_item_append_text(ti, ": TxSeq %d, RxSeq: %d",
tvb_get_ntohl(tvb, offset2),
tvb_get_ntohl(tvb, offset2+4));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_HELLO_TXSEQ],
tvb, offset2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_HELLO_RXSEQ],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_BEGIN_VERIFY:
switch(type) {
case 1:
{
float transmission_rate;
static int * const verify_flags[] = {
&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_ALL_LINKS],
&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_LINK_TYPE],
NULL
};
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS], lmp_subtree[LMP_TREE_BEGIN_VERIFY_FLAGS], verify_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree, hf_lmp_verify_interval, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree, hf_lmp_number_of_data_links, tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_ENCTYPE],
tvb, offset2+8, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree, hf_lmp_verify_transport_mechanism, tvb, offset2+10, 2, ENC_BIG_ENDIAN);
transmission_rate = tvb_get_ntohieee_float(tvb, offset2+12)*8/1000000;
proto_tree_add_float_format_value(lmp_object_tree, hf_lmp_transmission_rate, tvb, offset2+12, 4,
transmission_rate, "%.3f Mbps", transmission_rate);
proto_tree_add_item(lmp_object_tree, hf_lmp_wavelength, tvb, offset2+16, 4, ENC_BIG_ENDIAN);
}
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_BEGIN_VERIFY_ACK:
switch(type) {
case 1:
proto_item_append_text(ti, ": VerifyDeadInterval: %d, TransportResponse: 0x%0x",
tvb_get_ntohs(tvb, offset2),
tvb_get_ntohs(tvb, offset2+2));
proto_tree_add_item(lmp_object_tree, hf_lmp_verifydeadinterval, tvb, offset2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree, hf_lmp_verify_transport_response, tvb, offset2+2, 2, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_VERIFY_ID:
switch(type) {
case 1:
proto_item_append_text(ti, ": %d",
tvb_get_ntohl(tvb, offset2));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_VERIFY_ID],
tvb, offset2, 4,
ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_TE_LINK:
{
static int * const link_flags[] = {
&hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS_FAULT_MGMT],
&hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS_LINK_VERIFY],
NULL
};
ti2 = proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS], lmp_subtree[LMP_TREE_TE_LINK_FLAGS], link_flags, ENC_NA);
l = tvb_get_uint8(tvb, offset2);
proto_item_append_text(ti2, ": %s%s",
(l&0x01) ? "Fault-Mgmt-Supported " : "",
(l&0x02) ? "Link-Verification-Supported " : "");
switch(type) {
case 1:
proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip_to_str(pinfo->pool, tvb, offset2+8));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV4],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV4],
tvb, offset2+8, 4, ENC_BIG_ENDIAN);
break;
case 2:
proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
tvb_ip6_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip6_to_str(pinfo->pool, tvb, offset2+20));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV6],
tvb, offset2+4, 16, ENC_NA);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV6],
tvb, offset2+20, 16, ENC_NA);
break;
case 3:
proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
tvb_get_ntohl(tvb, offset2+4),
tvb_get_ntohl(tvb, offset2+8));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_UNNUM],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_UNNUM],
tvb, offset2+8, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
}
break;
case LMP_CLASS_DATA_LINK:
{
static int * const link_flags[] = {
&hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_PORT],
&hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_ALLOCATED],
NULL
};
ti2 = proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS], lmp_subtree[LMP_TREE_DATA_LINK_FLAGS], link_flags, ENC_NA);
l = tvb_get_uint8(tvb, offset2);
proto_item_append_text(ti2, ": %s%s",
(l&0x01) ? "Interface-Type-Port " : "Interface-Type-Component-Link ",
(l&0x02) ? "Allocated " : "Unallocated ");
switch(type) {
case 1:
proto_item_append_text(ti, ": IPv4: Local %s, Remote %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip_to_str(pinfo->pool, tvb, offset2+8));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_IPV4],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_IPV4],
tvb, offset2+8, 4, ENC_BIG_ENDIAN);
l = 12;
break;
case 2:
proto_item_append_text(ti, ": IPv6: Local %s, Remote %s",
tvb_ip6_to_str(pinfo->pool, tvb, offset2+4),
tvb_ip6_to_str(pinfo->pool, tvb, offset2+8));
proto_tree_add_item(lmp_object_tree, hf_lmp_data_link_local_id_ipv6, tvb, offset2+4, 16, ENC_NA);
proto_tree_add_item(lmp_object_tree, hf_lmp_data_link_remote_id_ipv6, tvb, offset2+20, 16, ENC_NA);
l = 36;
break;
case 3:
proto_item_append_text(ti, ": Unnumbered: Local %d, Remote %d",
tvb_get_ntohl(tvb, offset2+4),
tvb_get_ntohl(tvb, offset2+8));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_UNNUM],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_UNNUM],
tvb, offset2+8, 4, ENC_BIG_ENDIAN);
l = 12;
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
while (l < obj_length - 4) {
float bandwidth;
mylen = tvb_get_uint8(tvb, offset2+l+1);
ti2 = proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ],
tvb, offset2+l, mylen, ENC_NA);
lmp_subobj_tree = proto_item_add_subtree(ti2,
lmp_subtree[LMP_TREE_DATA_LINK_SUBOBJ]);
proto_tree_add_item(lmp_subobj_tree, hf_lmp_subobject_type, tvb, offset2+l, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree, hf_lmp_subobject_length, tvb, offset2+l+1, 1, ENC_BIG_ENDIAN);
switch(tvb_get_uint8(tvb, offset2+l)) {
case 1:
proto_item_set_text(ti2, "Interface Switching Capability: "
"Switching Cap: %s, Encoding Type: %s, "
"Min BW: %.3f Mbps, Max BW: %.3f Mbps",
rval_to_str(tvb_get_uint8(tvb, offset2+l+2),
gmpls_switching_type_rvals, "Unknown (%d)"),
rval_to_str(tvb_get_uint8(tvb, offset2+l+3),
gmpls_lsp_enc_rvals, "Unknown (%d)"),
tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000,
tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_SWITCHING_TYPE],
tvb, offset2+l+2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_LSP_ENCODING],
tvb, offset2+l+3, 1, ENC_BIG_ENDIAN);
bandwidth = tvb_get_ntohieee_float(tvb, offset2+l+4)*8/1000000;
proto_tree_add_float_format_value(lmp_subobj_tree, hf_lmp_minimum_reservable_bandwidth, tvb, offset2+l+4, 4,
bandwidth, "%.3f Mbps", bandwidth);
bandwidth = tvb_get_ntohieee_float(tvb, offset2+l+8)*8/1000000;
proto_tree_add_float_format_value(lmp_subobj_tree, hf_lmp_maximum_reservable_bandwidth, tvb, offset2+l+8, 4,
bandwidth, "%.3f Mbps", bandwidth);
break;
case 2:
proto_item_set_text(ti2, "Wavelength: %d",
tvb_get_ntohl(tvb, offset2+l+2));
proto_tree_add_item(lmp_subobj_tree, hf_lmp_wavelength, tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_subobj_tree, hf_lmp_data, tvb, offset2+l,
tvb_get_uint8(tvb, offset2+l+1), ENC_NA);
break;
}
if (tvb_get_uint8(tvb, offset2+l+1) == 0)
break;
l += tvb_get_uint8(tvb, offset2+l+1);
}
}
break;
case LMP_CLASS_CHANNEL_STATUS:
k = 0; j = 0;
switch(type) {
case 1:
case 3:
k = 8; break;
case 2:
k = 20; break;
}
if (!k)
break;
for (l=0; l<obj_length - 4; ) {
lmp_subobj_tree = proto_tree_add_subtree(lmp_object_tree, tvb, offset2+l, k,
lmp_subtree[LMP_TREE_CHANNEL_STATUS_ID], &ti2, "Interface-Id");
switch(type) {
case 1:
if (j < 4)
proto_item_append_text(ti, ": [IPv4-%s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+l));
proto_item_append_text(ti2, ": IPv4 %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+l));
proto_tree_add_item(lmp_subobj_tree, hf_lmp_interface_id_ipv4, tvb, offset2+l, 4, ENC_BIG_ENDIAN);
l += 4;
break;
case 2:
if (j < 4)
proto_item_append_text(ti, ": [IPv6-%s", tvb_ip6_to_str(pinfo->pool, tvb, offset2+l));
proto_item_append_text(ti2, ": IPv6 %s", tvb_ip6_to_str(pinfo->pool, tvb, offset2+l));
proto_tree_add_item(lmp_subobj_tree, hf_lmp_interface_id_ipv6, tvb, offset2, 16, ENC_NA);
l += 16;
break;
case 3:
if (j < 4)
proto_item_append_text(ti, ": [Unnum-%d",
tvb_get_ntohl(tvb, offset2+l));
proto_item_append_text(ti, ": Unnumbered %d",
tvb_get_ntohl(tvb, offset2+l));
proto_tree_add_item(lmp_subobj_tree, hf_lmp_interface_id_unnumbered, tvb, offset2+l, 4, ENC_BIG_ENDIAN);
l += 4;
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2+l, obj_length-4-l, ENC_NA);
break;
}
if (l == obj_length - 4) break;
proto_tree_add_item(lmp_subobj_tree, hf_lmp_link, tvb, offset2+l, 4, ENC_NA);
if (j < 4)
proto_item_append_text(ti, "-%s,%s], ",
tvb_get_uint8(tvb, offset2+l) & 0x80 ? "Act" : "NA",
val_to_str(tvb_get_ntohl(tvb, offset2+l) & 0x7fffffff,
channel_status_short_str, "UNK (%u)."));
proto_item_append_text(ti2, ": %s, ",
tvb_get_uint8(tvb, offset2+l) & 0x80 ? "Active" : "Not Active");
proto_tree_add_item(lmp_subobj_tree, hf_lmp_channel_status, tvb, offset2+l, 4, ENC_BIG_ENDIAN);
proto_item_append_text(ti2, "%s", val_to_str(tvb_get_ntohl(tvb, offset2+l) & 0x7fffffff,
channel_status_str, "Unknown (%u). "));
j++;
l += 4;
if (j==4 && l < obj_length - 4)
proto_item_append_text(ti, " ...");
}
break;
case LMP_CLASS_CHANNEL_STATUS_REQUEST:
for (l=0; l<obj_length - 4; ) {
switch(type) {
case 1:
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV4],
tvb, offset2+l, 4, ENC_BIG_ENDIAN);
l += 4;
break;
case 2:
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV6],
tvb, offset2+l, 16, ENC_NA);
l += 16;
break;
case 3:
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_UNNUM],
tvb, offset2+l, 4, ENC_BIG_ENDIAN);
l += 4;
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2+l, obj_length-4-l, ENC_NA);
l = obj_length - 4;
break;
}
}
break;
case LMP_CLASS_ERROR:
l = tvb_get_ntohl(tvb, offset2);
ti2 = proto_tree_add_uint(lmp_object_tree, hf_lmp_filter[LMPF_VAL_ERROR],
tvb, offset2, 4, l);
switch(type) {
case 1:
{
static int * const error_flags[] = {
&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNSUPPORTED_LINK],
&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNWILLING],
&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_TRANSPORT],
&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_TE_LINK_ID],
NULL
};
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_ERROR], lmp_subtree[LMP_TREE_ERROR_FLAGS], error_flags, ENC_NA);
proto_item_append_text(ti, ": BEGIN_VERIFY_ERROR: %s%s%s%s",
(l&0x01) ? "Unsupported-Link " : "",
(l&0x02) ? "Unwilling" : "",
(l&0x04) ? "Unsupported-Transport" : "",
(l&0x08) ? "TE-Link-ID" : "");
}
break;
case 2:
{
static int * const error_flags[] = {
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_PARAMETERS],
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_RENEGOTIATE],
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_TE_LINK],
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_DATA_LINK],
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_TEL_CTYPE],
&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_DL_CTYPE],
NULL
};
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_ERROR], lmp_subtree[LMP_TREE_ERROR_FLAGS], error_flags, ENC_NA);
proto_item_append_text(ti, ": LINK_SUMMARY_ERROR: %s%s%s%s%s%s",
(l&0x01) ? "Unacceptable-Params " : "",
(l&0x02) ? "Renegotiate" : "",
(l&0x04) ? "Bad-TE-Link" : "",
(l&0x08) ? "Bad-Data-Link" : "",
(l&0x10) ? "Bad-TE-Link-CType" : "",
(l&0x20) ? "Bad-Data-Link-CType" : "");
}
break;
case 3:
{
static int * const error_flags[] = {
&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_UNSUPPORTED_TYPE],
&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_INVALID_MSG],
&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_UNKNOWN_CTYPE],
NULL
};
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_ERROR], lmp_subtree[LMP_TREE_ERROR_FLAGS], error_flags, ENC_NA);
proto_item_append_text(ti, ": TRACE_ERROR: %s%s%s",
(l&0x01) ? "Unsupported Trace Type " : "",
(l&0x02) ? "Invalid Trace Message" : "",
(l&0x10) ? "Unknown Object C-Type" : "");
}
break;
case 4:
{
static int * const error_flags[] = {
&hf_lmp_filter[LMPF_VAL_ERROR_LAD_AREA_ID_MISMATCH],
&hf_lmp_filter[LMPF_VAL_ERROR_LAD_TCP_ID_MISMATCH],
&hf_lmp_filter[LMPF_VAL_ERROR_LAD_DA_DCN_MISMATCH],
&hf_lmp_filter[LMPF_VAL_ERROR_LAD_CAPABILITY_MISMATCH],
&hf_lmp_filter[LMPF_VAL_ERROR_LAD_UNKNOWN_CTYPE],
NULL
};
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_ERROR], lmp_subtree[LMP_TREE_ERROR_FLAGS], error_flags, ENC_NA);
proto_item_append_text(ti, ": LAD_ERROR: %s%s%s%s%s",
(l&0x01) ? "Domain Routing Area ID mismatch" : "",
(l&0x02) ? "TCP ID mismatch" : "",
(l&0x04) ? "DA DCN mismatch" : "",
(l&0x08) ? "Capability mismatch" : "",
(l&0x10) ? "Unknown Object C-Type" : "");
}
break;
default:
proto_item_append_text(ti, ": UNKNOWN_ERROR (%d): 0x%04x", type, l);
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_TRACE:
switch (type) {
case 1:
l = tvb_get_ntohs(tvb, offset2);
proto_tree_add_uint(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_TYPE],
tvb, offset2, 2, l);
proto_item_append_text(lmp_object_tree, ": %s",
val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
l = tvb_get_ntohs(tvb, offset2+2);
trace_item = proto_tree_add_uint(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_LEN],
tvb, offset2+2, 2, l);
if (l && l <= obj_length - 8) {
proto_item_append_text(lmp_object_tree, " = %s",
tvb_format_text(pinfo->pool, tvb, offset2+4, l));
proto_tree_add_string(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_MSG],
tvb, offset2+4, l, tvb_format_text(pinfo->pool, tvb,
offset2+4,l));
}
else
expert_add_info(pinfo, trace_item, &ei_lmp_trace_len);
break;
case 2:
l = tvb_get_ntohs(tvb, offset2);
proto_tree_add_uint(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_TYPE],
tvb, offset2, 2, l);
proto_item_append_text(lmp_object_tree, ": %s",
val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
l = tvb_get_ntohs(tvb, offset2+2);
proto_tree_add_uint(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_LEN],
tvb, offset2+2, 2, l);
proto_item_append_text(lmp_object_tree, " = %s",
tvb_format_text(pinfo->pool, tvb, offset2+4, l));
proto_tree_add_string(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_MSG],
tvb, offset2+4, l, tvb_format_text(pinfo->pool, tvb, offset2+4,l));
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_TRACE_REQ:
switch (type) {
case 1:
l = tvb_get_ntohs(tvb, offset2);
proto_tree_add_uint(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_TRACE_REQ_TYPE],
tvb, offset2, 2, l);
proto_item_append_text(lmp_object_tree, ": %s",
val_to_str(l, lmp_trace_type_str, "Unknown (%d)"));
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_SERVICE_CONFIG:
/* Support for the ServiceConfig object defined in the UNI 1.0 spec */
switch (type) {
case 1:
{
static int * const sp_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP],
NULL
};
/* Supported Signaling Protocols Object */
/* Signaling Protocols */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_SP_FLAGS], sp_flags, ENC_NA);
l = tvb_get_uint8(tvb, offset2);
proto_item_append_text(ti2, ": %s %s",
(l & 0x01) ? "RSVP-based UNI signaling supported " : "",
(l & 0x02) ? "LDP-based UNI signaling supported " : "");
/* UNI version */
proto_tree_add_item(lmp_object_tree, hf_lmp_uni_version, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
}
break;
case 2:
{
static int * const tp_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD],
NULL
};
static int * const cct_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED],
NULL
};
/* Client Port-Level Service Attributes Object */
/* Link Type */
proto_tree_add_item(lmp_object_tree, hf_lmp_link_type, tvb, offset2, 1, ENC_BIG_ENDIAN);
proto_item_append_text(lmp_object_tree, "%s",
val_to_str(tvb_get_uint8(tvb, offset2),
service_attribute_link_type_str,
"Unknown (%u). "));
l = tvb_get_uint8(tvb, offset2+1);
/* Signal type for SDH */
if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SDH) {
/* Signal types for an SDH link */
proto_tree_add_item(lmp_object_tree, hf_lmp_signal_types_sdh, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
proto_item_append_text(lmp_object_tree, "%s",
val_to_str(tvb_get_uint8(tvb, offset2+1),
service_attribute_signal_types_sdh_str,
"Unknown (%u). "));
}
if (l == LMP_CLASS_SERVICE_CONFIG_CPSA_SIGNAL_TYPES_SONET) {
/* Signal types for a SONET link */
proto_tree_add_item(lmp_object_tree, hf_lmp_signal_types_sonet, tvb, offset2+1, 1, ENC_BIG_ENDIAN);
proto_item_append_text(lmp_object_tree, "%s",
val_to_str(tvb_get_uint8(tvb, offset2+1),
service_attribute_signal_types_sonet_str,
"Unknown (%u). "));
}
/* TP Transparency */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2+2, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_TP_FLAGS], tp_flags, ENC_NA);
l = tvb_get_uint8(tvb, offset2+2);
proto_item_append_text(ti2, ": %s%s%s",
(l & 0x01) ? "Path/VC Overhead Transparency " : "",
(l & 0x02) ? "Line/MS Overhead Transparency " : "",
(l & 0x04) ? "Section/RS Overhead Transparency " : "");
/* Contiguous Concatenation Types */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2+3, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_CPSA_CCT_FLAGS], cct_flags, ENC_NA);
/* Min and Max NCC */
proto_item_append_text(ti, ": Minimum NCC: %d, Maximum NCC: %d",
tvb_get_ntohs(tvb, offset2+4),
tvb_get_ntohs(tvb, offset2+6));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC],
tvb, offset2+4, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC],
tvb, offset2+6, 2, ENC_BIG_ENDIAN);
/* Min and Max NVC */
proto_item_append_text(ti, ": Minimum NVC: %d, Maximum NVC: %d",
tvb_get_ntohs(tvb, offset2+8),
tvb_get_ntohs(tvb, offset2+10));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC],
tvb, offset2+8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC],
tvb, offset2+10, 2, ENC_BIG_ENDIAN);
/* Local interface ID */
proto_item_append_text(ti, ": Local Interface ID %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+12));
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID],
tvb, offset2+12, 4, ENC_BIG_ENDIAN);
}
break;
case 3:
{
static int * const t_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_SOH],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_LOH],
NULL
};
static int * const tcm_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED],
NULL
};
/* Network Transparency Support and TCM Monitoring Object */
/* Transparency */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS], t_flags, ENC_BIG_ENDIAN);
l = tvb_get_ntohl(tvb, offset2);
proto_item_append_text(ti2, ": %s %s",
(l & 0x01) ? "Standard SOH/RSOH transparency supported " : "",
(l & 0x02) ? "Standard LOH/MSOH transparency supported " : "");
/* TCM Monitoring */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2+7, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_TCM_FLAGS], tcm_flags, ENC_BIG_ENDIAN);
l = tvb_get_uint8(tvb, offset2+7);
proto_item_append_text(ti2, ": %s",
(l & 0x01) ? "Transparent Support of TCM available " : "");
}
break;
case 4:
{
static int * const diversity_flags[] = {
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK],
&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG],
NULL
};
/* Network Diversity Object */
proto_tree_add_bitmask(lmp_object_tree, tvb, offset2+3, hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS], lmp_subtree[LMP_TREE_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS], diversity_flags, ENC_BIG_ENDIAN);
l = tvb_get_uint8(tvb,offset2+3);
proto_item_append_text(ti2, ": %s%s%s",
(l & 0x01) ? "Node Diversity is supported " : "",
(l & 0x02) ? "Link Diversity is supported " : "",
(l & 0x04) ? "SRLG Diversity is supported " : "");
}
break;
default:
/* Unknown type in Service Config object */
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_DA_DCN_ADDRESS:
switch(type) {
case 1:
proto_item_append_text(ti, ": %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_LOCAL_DA_DCN_ADDR], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
case 2:
proto_item_append_text(ti, ": %s", tvb_ip_to_str(pinfo->pool, tvb, offset2));
proto_tree_add_item(lmp_object_tree, hf_lmp_filter[LMPF_VAL_REMOTE_DA_DCN_ADDR], tvb,
offset2, 4, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
case LMP_CLASS_LOCAL_LAD_INFO:
switch(type) {
case 1:
proto_item_append_text(ti, ": IPv4");
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_NODE_ID],
tvb, offset2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_AREA_ID],
tvb, offset2+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_TE_LINK_ID],
tvb, offset2+8, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_COMPONENT_ID],
tvb, offset2+12, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ID],
tvb, offset2+16, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ADDR],
tvb, offset2+20, 4, ENC_BIG_ENDIAN);
l = 24;
while (l < obj_length - 4) {
mylen = tvb_get_uint8(tvb, offset2+l+1);
ti2 = proto_tree_add_item(lmp_object_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ],
tvb, offset2+l, mylen, ENC_NA);
lmp_subobj_tree = proto_item_add_subtree(ti2,
lmp_subtree[LMP_TREE_LAD_INFO_SUBOBJ]);
proto_tree_add_item(lmp_subobj_tree, hf_lmp_subobject_type, tvb, offset2+l, 1, ENC_BIG_ENDIAN);
if (mylen == 0 || l + mylen > obj_length - 4) {
proto_tree_add_uint_format_value(lmp_object_tree, hf_lmp_subobject_length, tvb, offset2+l+1, 1,
mylen, "%d (Invalid)", mylen);
break;
}
else
proto_tree_add_item(lmp_subobj_tree, hf_lmp_subobject_length, tvb, offset2+l+1, 1, ENC_BIG_ENDIAN);
switch(tvb_get_uint8(tvb, offset2+l)) {
case 250:
proto_item_set_text(ti2, "Primary Routing Controller: "
"Area ID: %s, RC PC ID: %s, "
"RC PC Addr: %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+4),
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+8),
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+12));
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_AREA_ID],
tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ID],
tvb, offset2+l+8, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ADDR],
tvb, offset2+l+12, 4, ENC_BIG_ENDIAN);
break;
case 251:
proto_item_set_text(ti2, "Secondary Routing Controller: "
"Area ID: %s, RC PC ID: %s, "
"RC PC Addr: %s",
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+4),
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+8),
tvb_ip_to_str(pinfo->pool, tvb, offset2+l+12));
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_AREA_ID],
tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ID],
tvb, offset2+l+8, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ADDR],
tvb, offset2+l+12, 4, ENC_BIG_ENDIAN);
break;
case 252:
proto_item_set_text(ti2, "SONET/SDH Layer Capability: "
"Switching Cap: %s, Encoding Type: %s",
rval_to_str(tvb_get_uint8(tvb, offset2+l+4),
gmpls_switching_type_rvals, "Unknown (%d)"),
rval_to_str(tvb_get_uint8(tvb, offset2+l+5),
gmpls_lsp_enc_rvals, "Unknown (%d)"));
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SWITCHING_TYPE],
tvb, offset2+l+4, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(lmp_subobj_tree,
hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_LSP_ENCODING],
tvb, offset2+l+5, 1, ENC_BIG_ENDIAN);
for (j = 0; j < (mylen - 8) / 4; j++) {
proto_tree_add_uint_format(lmp_subobj_tree, hf_lmp_free_timeslots, tvb, offset2+l+8+(j*4), 4,
tvb_get_ntoh24(tvb, offset2+l+9+(j*4)), "%s: %d free timeslots",
val_to_str_ext(tvb_get_uint8(tvb, offset2+l+8+(j*4)),
&gmpls_sonet_signal_type_str_ext,
"Unknown Signal Type (%d)"),
tvb_get_ntoh24(tvb, offset2+l+9+(j*4)));
}
break;
default:
proto_tree_add_item(lmp_subobj_tree, hf_lmp_data, tvb, offset2+l,
tvb_get_uint8(tvb, offset2+l+1), ENC_NA);
break;
}
if (tvb_get_uint8(tvb, offset2+l+1) == 0)
break;
l += tvb_get_uint8(tvb, offset2+l+1);
}
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
break;
default:
proto_tree_add_item(lmp_object_tree, hf_lmp_data, tvb, offset2, mylen, ENC_NA);
break;
}
offset += obj_length;
len += obj_length;
} /* while */
} /* tree */
return tvb_captured_length(tvb);
}
static void
register_lmp_prefs (void)
{
module_t *lmp_module;
lmp_module = prefs_register_protocol(proto_lmp, NULL);
prefs_register_bool_preference(
lmp_module, "checksum", "LMP checksum field",
"Whether LMP contains a checksum which can be checked", &lmp_checksum_config);
prefs_register_obsolete_preference(lmp_module, "version");
}
void
proto_register_lmp(void)
{
static int *ett[NUM_LMP_SUBTREES];
int i;
static hf_register_info lmpf_info[] = {
/* Message type number */
{&hf_lmp_filter[LMPF_MSG],
{ "Message Type", "lmp.msg", FT_UINT8, BASE_DEC, VALS(message_type_vals), 0x0,
NULL, HFILL }},
/* Message type shorthands */
{&hf_lmp_filter[LMPF_MSG_CONFIG],
{ "Config Message", "lmp.msg.config", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CONFIG_ACK],
{ "ConfigAck Message", "lmp.msg.configack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CONFIG_NACK],
{ "ConfigNack Message", "lmp.msg.confignack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_HELLO],
{ "HELLO Message", "lmp.msg.hello", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_BEGIN_VERIFY],
{ "BeginVerify Message", "lmp.msg.beginverify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_BEGIN_VERIFY_ACK],
{ "BeginVerifyAck Message", "lmp.msg.beginverifyack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_BEGIN_VERIFY_NACK],
{ "BeginVerifyNack Message", "lmp.msg.beginverifynack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_END_VERIFY],
{ "EndVerify Message", "lmp.msg.endverify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_END_VERIFY_ACK],
{ "EndVerifyAck Message", "lmp.msg.endverifyack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TEST],
{ "Test Message", "lmp.msg.test", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TEST_STATUS_SUCCESS],
{ "TestStatusSuccess Message", "lmp.msg.teststatussuccess", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TEST_STATUS_FAILURE],
{ "TestStatusFailure Message", "lmp.msg.teststatusfailure", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TEST_STATUS_ACK],
{ "TestStatusAck Message", "lmp.msg.teststatusack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_LINK_SUMMARY],
{ "LinkSummary Message", "lmp.msg.linksummary", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_LINK_SUMMARY_ACK],
{ "LinkSummaryAck Message", "lmp.msg.linksummaryack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_LINK_SUMMARY_NACK],
{ "LinkSummaryNack Message", "lmp.msg.linksummarynack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CHANNEL_STATUS],
{ "ChannelStatus Message", "lmp.msg.channelstatus", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CHANNEL_STATUS_ACK],
{ "ChannelStatusAck Message", "lmp.msg.channelstatusack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CHANNEL_STATUS_REQ],
{ "ChannelStatusRequest Message", "lmp.msg.channelstatusrequest", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_CHANNEL_STATUS_RESP],
{ "ChannelStatusResponse Message", "lmp.msg.channelstatusresponse", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_MONITOR],
{ "TraceMonitor Message", "lmp.msg.tracemonitor", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_MONITOR_ACK],
{ "TraceMonitorAck Message", "lmp.msg.tracemonitorack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_MONITOR_NACK],
{ "TraceMonitorNack Message", "lmp.msg.tracemonitornack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_MISMATCH],
{ "TraceMismatch Message", "lmp.msg.tracemismatch", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_MISMATCH_ACK],
{ "TraceMismatchAck Message", "lmp.msg.tracemismatchack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_REQUEST],
{ "TraceRequest Message", "lmp.msg.tracerequest", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_REPORT],
{ "TraceReport Message", "lmp.msg.tracereport", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_TRACE_REQUEST_NACK],
{ "TraceRequestNack Message", "lmp.msg.tracerequestnack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_INSERT_TRACE],
{ "InsertTrace Message", "lmp.msg.inserttrace", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_INSERT_TRACE_ACK],
{ "InsertTraceAck Message", "lmp.msg.inserttraceack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_INSERT_TRACE_NACK],
{ "InsertTraceNack Message", "lmp.msg.inserttracenack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_SERVICE_CONFIG],
{ "ServiceConfig Message", "lmp.msg.serviceconfig", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_SERVICE_CONFIG_ACK],
{ "ServiceConfigAck Message", "lmp.msg.serviceconfigack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_SERVICE_CONFIG_NACK],
{ "ServiceConfigNack Message", "lmp.msg.serviceconfignack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_DISCOVERY_RESP],
{ "DiscoveryResponse Message", "lmp.msg.discoveryresp", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_DISCOVERY_RESP_ACK],
{ "DiscoveryResponseAck Message", "lmp.msg.discoveryrespack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_MSG_DISCOVERY_RESP_NACK],
{ "DiscoveryResponseNack Message", "lmp.msg.discoveryrespnack", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* LMP Message Header Fields ------------------- */
{&hf_lmp_filter[LMPF_HDR_FLAGS],
{ "LMP Header - Flags", "lmp.hdr.flags", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_HDR_FLAGS_CC_DOWN],
{ "ControlChannelDown", "lmp.hdr.ccdown", FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_HDR_FLAGS_REBOOT],
{ "Reboot", "lmp.hdr.reboot", FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL }},
/* LMP object class filters ------------------------------- */
{&hf_lmp_filter[LMPF_OBJECT],
{ "LOCAL_CCID", "lmp.object", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_CCID],
{ "CCID", "lmp.obj.ccid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_NODE_ID],
{ "NODE_ID", "lmp.obj.Nodeid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_LINK_ID],
{ "LINK_ID", "lmp.obj.linkid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_INTERFACE_ID],
{ "INTERFACE_ID", "lmp.obj.interfaceid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_MESSAGE_ID],
{ "MESSAGE_ID", "lmp.obj.messageid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_CONFIG],
{ "CONFIG", "lmp.obj.config", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_HELLO],
{ "HELLO", "lmp.obj.hello", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_BEGIN_VERIFY],
{ "BEGIN_VERIFY", "lmp.obj.begin_verify", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_BEGIN_VERIFY_ACK],
{ "BEGIN_VERIFY_ACK", "lmp.obj.begin_verify_ack", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_VERIFY_ID],
{ "VERIFY_ID", "lmp.obj.verifyid", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_TE_LINK],
{ "TE_LINK", "lmp.obj.te_link", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_DATA_LINK],
{ "DATA_LINK", "lmp.obj.data_link", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_CHANNEL_STATUS],
{ "CHANNEL_STATUS", "lmp.obj.channel_status", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_CHANNEL_STATUS_REQUEST],
{ "CHANNEL_STATUS_REQUEST", "lmp.obj.channel_status_request", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_ERROR],
{ "ERROR", "lmp.obj.error", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_TRACE],
{ "TRACE", "lmp.obj.trace", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_TRACE_REQ],
{ "TRACE REQ", "lmp.obj.trace_req", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_SERVICE_CONFIG],
{ "SERVICE_CONFIG", "lmp.obj.serviceconfig", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_DA_DCN_ADDRESS],
{ "DA_DCN_ADDRESS", "lmp.obj.dadcnaddr", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CLASS_LOCAL_LAD_INFO],
{ "LOCAL_LAD_INFO", "lmp.obj.localladinfo", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Other LMP Value Filters ------------------------------ */
{&hf_lmp_filter[LMPF_VAL_CTYPE],
{ "Object C-Type", "lmp.obj.ctype", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_CCID],
{ "Local CCID Value", "lmp.local_ccid", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_CCID],
{ "Remote CCID Value", "lmp.remote_ccid", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_NODE_ID],
{ "Local Node ID Value", "lmp.local_nodeid", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_NODE_ID],
{ "Remote Node ID Value", "lmp.remote_nodeid", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LINK_ID_IPV4],
{ "Local Link ID - IPv4", "lmp.local_linkid_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LINK_ID_IPV6],
{ "Local Link ID - IPv6", "lmp.local_linkid_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LINK_ID_UNNUM],
{ "Local Link ID - Unnumbered", "lmp.local_linkid_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_LINK_ID_IPV4],
{ "Remote Link ID - IPv4", "lmp.remote_linkid_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_LINK_ID_IPV6],
{ "Remote Link ID - IPv6", "lmp.remote_linkid_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_LINK_ID_UNNUM],
{ "Remote Link ID - Unnumbered", "lmp.remote_linkid_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_INTERFACE_ID_IPV4],
{ "Local Interface ID - IPv4", "lmp.local_interfaceid_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_INTERFACE_ID_IPV6],
{ "Local Interface ID - IPv6", "lmp.local_interfaceid_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_INTERFACE_ID_UNNUM],
{ "Local Interface ID - Unnumbered", "lmp.local_interfaceid_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_INTERFACE_ID_IPV4],
{ "Remote Interface ID - IPv4", "lmp.remote_interfaceid_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_INTERFACE_ID_IPV6],
{ "Remote Interface ID - IPv6", "lmp.remote_interfaceid_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_INTERFACE_ID_UNNUM],
{ "Remote Interface ID - Unnumbered", "lmp.remote_interfaceid_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV4],
{ "Interface ID: IPv4", "lmp.channel_status_interfaceid_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_IPV6],
{ "Interface ID: IPv6", "lmp.channel_status_interfaceid_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_CHANNEL_STATUS_INTERFACE_ID_UNNUM],
{ "Interface ID: Unnumbered", "lmp.channel_status_interfaceid_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_MESSAGE_ID],
{ "Message-ID Value", "lmp.messageid", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_MESSAGE_ID_ACK],
{ "Message-ID Ack Value", "lmp.messageid_ack", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_CONFIG_HELLO],
{ "HelloInterval", "lmp.hellointerval", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_CONFIG_HELLO_DEAD],
{ "HelloDeadInterval", "lmp.hellodeadinterval", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_HELLO_TXSEQ],
{ "TxSeqNum", "lmp.txseqnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_HELLO_RXSEQ],
{ "RxSeqNum", "lmp.rxseqnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS],
{ "Flags", "lmp.begin_verify.flags", FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_ALL_LINKS],
{ "Verify All Links", "lmp.begin_verify.all_links",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_FLAGS_LINK_TYPE],
{ "Data Link Type", "lmp.begin_verify.link_type",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_BEGIN_VERIFY_ENCTYPE],
{ "Encoding Type", "lmp.begin_verify.enctype",
FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(gmpls_lsp_enc_rvals), 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_VERIFY_ID],
{ "Verify-ID", "lmp.verifyid", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS],
{ "TE-Link Flags", "lmp.te_link_flags", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS_FAULT_MGMT],
{ "Fault Management Supported", "lmp.te_link.fault_mgmt",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_FLAGS_LINK_VERIFY],
{ "Link Verification Supported", "lmp.te_link.link_verify",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV4],
{ "TE-Link Local ID - IPv4", "lmp.te_link.local_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_IPV6],
{ "TE-Link Local ID - IPv6", "lmp.te_link.local_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_LOCAL_UNNUM],
{ "TE-Link Local ID - Unnumbered", "lmp.te_link.local_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV4],
{ "TE-Link Remote ID - IPv4", "lmp.te_link.remote_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_IPV6],
{ "TE-Link Remote ID - IPv6", "lmp.te_link.remote_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TE_LINK_REMOTE_UNNUM],
{ "TE-Link Remote ID - Unnumbered", "lmp.te_link.remote_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS],
{ "Data-Link Flags", "lmp.data_link_flags", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_PORT],
{ "Data-Link is Individual Port", "lmp.data_link.port",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_FLAGS_ALLOCATED],
{ "Data-Link is Allocated", "lmp.data_link.link_verify",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_IPV4],
{ "Data-Link Local ID - IPv4", "lmp.data_link.local_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_LOCAL_UNNUM],
{ "Data-Link Local ID - Unnumbered", "lmp.data_link.local_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_IPV4],
{ "Data-Link Remote ID - IPv4", "lmp.data_link.remote_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_REMOTE_UNNUM],
{ "Data-Link Remote ID - Unnumbered", "lmp.data_link.remote_unnum", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ],
{ "Subobject", "lmp.data_link_subobj", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_SWITCHING_TYPE],
{ "Interface Switching Capability", "lmp.data_link_switching", FT_UINT8, BASE_DEC|BASE_RANGE_STRING,
RVALS(gmpls_switching_type_rvals), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_DATA_LINK_SUBOBJ_LSP_ENCODING],
{ "LSP Encoding Type", "lmp.data_link_encoding", FT_UINT8, BASE_DEC|BASE_RANGE_STRING,
RVALS(gmpls_lsp_enc_rvals), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR],
{ "Error Code", "lmp.error", FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNSUPPORTED_LINK],
{ "Verification - Unsupported for this TE-Link", "lmp.error.verify_unsupported_link",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNWILLING],
{ "Verification - Unwilling to Verify at this time", "lmp.error.verify_unwilling",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_TRANSPORT],
{ "Verification - Transport Unsupported", "lmp.error.verify_unsupported_transport",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_TE_LINK_ID],
{ "Verification - TE Link ID Configuration Error", "lmp.error.verify_te_link_id",
FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_VERIFY_UNKNOWN_CTYPE],
{ "Verification - Unknown Object C-Type", "lmp.error.verify_unknown_ctype",
FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_PARAMETERS],
{ "Summary - Unacceptable non-negotiable parameters", "lmp.error.summary_bad_params",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_RENEGOTIATE],
{ "Summary - Renegotiate Parameter", "lmp.error.summary_renegotiate",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_TE_LINK],
{ "Summary - Bad TE Link Object", "lmp.error.summary_bad_te_link",
FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_DATA_LINK],
{ "Summary - Bad Data Link Object", "lmp.error.summary_bad_data_link",
FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_TEL_CTYPE],
{ "Summary - Bad TE Link C-Type", "lmp.error.summary_unknown_tel_ctype",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_UNKNOWN_DL_CTYPE],
{ "Summary - Bad Data Link C-Type", "lmp.error.summary_unknown_dl_ctype",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_SUMMARY_BAD_REMOTE_LINK_ID],
{ "Summary - Bad Remote Link ID", "lmp.error.summary_bad_remote_link_id",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_CONFIG_BAD_PARAMETERS],
{ "Config - Unacceptable non-negotiable parameters", "lmp.error.config_bad_params",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_CONFIG_RENEGOTIATE],
{ "Config - Renegotiate Parameter", "lmp.error.config_renegotiate",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_CONFIG_BAD_CCID],
{ "Config - Bad CC ID", "lmp.error.config_bad_ccid",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_UNSUPPORTED_TYPE],
{ "Trace - Unsupported trace type", "lmp.error.trace_unsupported_type",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_INVALID_MSG],
{ "Trace - Invalid Trace Message", "lmp.error.trace_invalid_msg",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_TRACE_UNKNOWN_CTYPE],
{ "Trace - Unknown Object C-Type", "lmp.error.trace_unknown_ctype",
FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_LAD_AREA_ID_MISMATCH],
{ "LAD - Domain Routing Area ID Mismatch detected", "lmp.error.lad_area_id_mismatch",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_LAD_TCP_ID_MISMATCH],
{ "LAD - TCP ID Mismatch detected", "lmp.error.lad_tcp_id_mismatch",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_LAD_DA_DCN_MISMATCH],
{ "LAD - DA DCN Mismatch detected", "lmp.error.lad_da_dcn_mismatch",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_LAD_CAPABILITY_MISMATCH],
{ "LAD - Capability Mismatch detected", "lmp.error.lad_capability_mismatch",
FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_ERROR_LAD_UNKNOWN_CTYPE],
{ "LAD - Unknown Object C-Type", "lmp.error.lad_unknown_ctype",
FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_TYPE],
{ "Local Trace Type", "lmp.trace.local_type", FT_UINT16, BASE_DEC,
VALS(lmp_trace_type_str), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_LEN],
{ "Local Trace Length", "lmp.trace.local_length", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_LOCAL_MSG],
{ "Local Trace Message", "lmp.trace.local_msg", FT_STRING, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_TYPE],
{ "Remote Trace Type", "lmp.trace.remote_type", FT_UINT16, BASE_DEC,
VALS(lmp_trace_type_str), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_LEN],
{ "Remote Trace Length", "lmp.trace.remote_length", FT_UINT16, BASE_DEC,
NULL, 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_REMOTE_MSG],
{ "Remote Trace Message", "lmp.trace.remote_msg", FT_STRING, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_TRACE_REQ_TYPE],
{ "Trace Type", "lmp.trace_req.type", FT_UINT16, BASE_DEC,
VALS(lmp_trace_type_str), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS],
{ "Service Config - Supported Signalling Protocols",
"lmp.service_config.sp", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_RSVP],
{ "RSVP is supported", "lmp.service_config.sp.rsvp",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_SP_FLAGS_LDP],
{ "LDP is supported", "lmp.service_config.sp.ldp",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS],
{ "Client Port Service Attributes", "lmp.service_config.cpsa",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_PATH_OVERHEAD],
{ "Path/VC Overhead Transparency Supported",
"lmp.service_config.cpsa.path_overhead",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_LINE_OVERHEAD],
{ "Line/MS Overhead Transparency Supported",
"lmp.service_config.cpsa.line_overhead",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_TP_FLAGS_SECTION_OVERHEAD],
{ "Section/RS Overhead Transparency Supported",
"lmp.service_config.cpsa.section_overhead",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS],
{ "Contiguous Concatenation Types", "lmp.service_config.cct",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_CCT_FLAGS_CC_SUPPORTED],
{ "Contiguous Concatenation Types Supported",
"lmp.service_config.cpsa.line_overhead",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NCC],
{ "Minimum Number of Contiguously Concatenated Components",
"lmp.service_config.cpsa.min_ncc",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NCC],
{ "Maximum Number of Contiguously Concatenated Components",
"lmp.service_config.cpsa.max_ncc",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MIN_NVC],
{ "Maximum Number of Contiguously Concatenated Components",
"lmp.service_config.cpsa.min_nvc",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_MAX_NVC],
{ "Minimum Number of Virtually Concatenated Components",
"lmp.service_config.cpsa.max_nvc",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_CPSA_INTERFACE_ID],
{ "Local interface id of the client interface referred to",
"lmp.service_config.cpsa.local_ifid",
FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS],
{ "Network Transparency Flags",
"lmp.service_config.nsa.transparency",
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_SOH],
{ "Standard SOH/RSOH transparency supported",
"lmp.service_config.nsa.transparency.soh",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TRANSPARENCY_FLAGS_LOH],
{ "Standard LOH/MSOH transparency supported",
"lmp.service_config.nsa.transparency.loh",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS],
{ "TCM Monitoring",
"lmp.service_config.nsa.tcm",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_TCM_FLAGS_TCM_SUPPORTED],
{ "TCM Monitoring Supported",
"lmp.service_config.nsa.transparency.tcm",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS],
{ "Network Diversity Flags",
"lmp.service_config.nsa.diversity",
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_NODE],
{ "Node diversity supported",
"lmp.service_config.nsa.diversity.node",
FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_LINK],
{ "Link diversity supported",
"lmp.service_config.nsa.diversity.link",
FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_SERVICE_CONFIG_NSA_NETWORK_DIVERSITY_FLAGS_SRLG],
{ "SRLG diversity supported",
"lmp.service_config.nsa.diversity.srlg",
FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL}},
{&hf_lmp_filter[LMPF_VAL_LOCAL_DA_DCN_ADDR],
{ "Local DA DCN Address", "lmp.local_da_dcn_addr", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_REMOTE_DA_DCN_ADDR],
{ "Remote DA DCN Address", "lmp.remote_da_dcn_addr", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_NODE_ID],
{ "Node ID", "lmp.local_lad_node_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_AREA_ID],
{ "Area ID", "lmp.local_lad_area_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_TE_LINK_ID],
{ "TE Link ID", "lmp.local_lad_telink_id", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_COMPONENT_ID],
{ "Component Link ID", "lmp.local_lad_comp_id", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ID],
{ "SC PC ID", "lmp.local_lad_sc_pc_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LOCAL_LAD_INFO_SC_PC_ADDR],
{ "SC PC Address", "lmp.local_lad_sc_pc_addr", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ],
{ "Subobject", "lmp.lad_info_subobj", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_AREA_ID],
{ "SC PC Address", "lmp.lad_pri_area_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ID],
{ "SC PC Address", "lmp.lad_pri_rc_pc_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_PRI_RC_PC_ADDR],
{ "SC PC Address", "lmp.lad_pri_rc_pc_addr", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_AREA_ID],
{ "SC PC Address", "lmp.lad_sec_area_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ID],
{ "SC PC Address", "lmp.lad_sec_rc_pc_id", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SEC_RC_PC_ADDR],
{ "SC PC Address", "lmp.lad_sec_rc_pc_addr", FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_SWITCHING_TYPE],
{ "Interface Switching Capability", "lmp.lad_switching", FT_UINT8, BASE_DEC|BASE_RANGE_STRING,
RVALS(gmpls_switching_type_rvals), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_VAL_LAD_INFO_SUBOBJ_LSP_ENCODING],
{ "LSP Encoding Type", "lmp.lad_encoding", FT_UINT8, BASE_DEC|BASE_RANGE_STRING,
RVALS(gmpls_lsp_enc_rvals), 0x0, NULL, HFILL }},
{&hf_lmp_filter[LMPF_CHECKSUM],
{ "Message Checksum", "lmp.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{&hf_lmp_filter[LMPF_CHECKSUM_STATUS],
{ "Checksum Status", "lmp.checksum.status", FT_UINT8, BASE_NONE, VALS(proto_checksum_vals), 0x0,
NULL, HFILL }},
{&hf_lmp_data,
{ "Data", "lmp.data", FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_lmp_version, { "LMP Version", "lmp.version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_header_flags, { "Flags", "lmp.header_flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_header_length, { "Length", "lmp.header_length", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_byte_bytes), 0x0, NULL, HFILL }},
{ &hf_lmp_negotiable, { "Negotiable", "lmp.negotiable", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80, NULL, HFILL }},
{ &hf_lmp_object_length, { "Length", "lmp.object_length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_object_class, { "Object Class", "lmp.object_class", FT_UINT8, BASE_DEC, VALS(lmp_class_vals), 0x0, NULL, HFILL }},
{ &hf_lmp_verify_interval, { "Verify Interval", "lmp.verify_interval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0, NULL, HFILL }},
{ &hf_lmp_number_of_data_links, { "Number of Data Links", "lmp.number_of_data_links", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_verify_transport_mechanism, { "Verify Transport Mechanism", "lmp.verify_transport_mechanism", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_transmission_rate, { "Transmission Rate", "lmp.transmission_rate", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_wavelength, { "Wavelength", "lmp.wavelength", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_verifydeadinterval, { "VerifyDeadInterval", "lmp.verifydeadinterval", FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x0, NULL, HFILL }},
{ &hf_lmp_verify_transport_response, { "Verify Transport Response", "lmp.verify_transport_response", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_data_link_local_id_ipv6, { "Data-Link Local ID - IPv6", "lmp.data_link.local_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_data_link_remote_id_ipv6, { "Data-Link Remote ID - IPv6", "lmp.data_link.remote_ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_subobject_type, { "Subobject Type", "lmp.subobject_type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_subobject_length, { "Subobject Length", "lmp.subobject_length", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_minimum_reservable_bandwidth, { "Minimum Reservable Bandwidth", "lmp.minimum_reservable_bandwidth", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_maximum_reservable_bandwidth, { "Maximum Reservable Bandwidth", "lmp.maximum_reservable_bandwidth", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_interface_id_ipv4, { "Interface ID - IPv4", "lmp.interface_id.ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_interface_id_ipv6, { "Interface ID - IPv6", "lmp.interface_id.ipv6", FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_interface_id_unnumbered, { "Interface ID - Unnumbered", "lmp.interface_id.id_unnumbered", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_link, { "Link", "lmp.link", FT_BOOLEAN, 32, TFS(&tfs_active_monitoring_not_allocated), 0x80000000, NULL, HFILL }},
{ &hf_lmp_channel_status, { "Channel Status", "lmp.channel_status", FT_UINT32, BASE_DEC, VALS(channel_status_str), 0x7fffffff, NULL, HFILL }},
{ &hf_lmp_uni_version, { "UNI Version", "lmp.uni_version", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_lmp_link_type, { "Link Type", "lmp.link_type", FT_UINT8, BASE_DEC, VALS(service_attribute_link_type_str), 0x0, NULL, HFILL }},
{ &hf_lmp_signal_types_sdh, { "Signal Types", "lmp.signal_types", FT_UINT8, BASE_DEC, VALS(service_attribute_signal_types_sdh_str), 0x0, NULL, HFILL }},
{ &hf_lmp_signal_types_sonet, { "Signal Types", "lmp.signal_types", FT_UINT8, BASE_DEC, VALS(service_attribute_signal_types_sonet_str), 0x0, NULL, HFILL }},
{ &hf_lmp_free_timeslots, { "Free timeslots", "lmp.free_timeslots", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }},
};
static ei_register_info ei[] = {
{ &ei_lmp_checksum_incorrect, { "lmp.checksum.incorrect", PI_PROTOCOL, PI_WARN, "Incorrect checksum", EXPFILL }},
{ &ei_lmp_invalid_msg_type, { "lmp.invalid_msg_type", PI_PROTOCOL, PI_WARN, "Invalid message type", EXPFILL }},
{ &ei_lmp_invalid_class, { "lmp.invalid_class", PI_PROTOCOL, PI_WARN, "Invalid class", EXPFILL }},
{ &ei_lmp_trace_len, { "lmp.trace.len_invalid", PI_PROTOCOL, PI_WARN, "Invalid Trace Length", EXPFILL }},
{ &ei_lmp_obj_len, { "lmp.obj.len_invalid", PI_PROTOCOL, PI_WARN, "Invalid Object Length", EXPFILL }}
};
expert_module_t* expert_lmp;
for (i=0; i<NUM_LMP_SUBTREES; i++) {
ett[i] = &lmp_subtree[i];
}
proto_lmp = proto_register_protocol("Link Management Protocol (LMP)", "LMP", "lmp");
expert_lmp = expert_register_protocol(proto_lmp);
expert_register_field_array(expert_lmp, ei, array_length(ei));
proto_register_field_array(proto_lmp, lmpf_info, array_length(lmpf_info));
proto_register_subtree_array(ett, array_length(ett));
lmp_handle = register_dissector("lmp", dissect_lmp, proto_lmp);
register_lmp_prefs();
}
void
proto_reg_handoff_lmp(void)
{
dissector_add_uint_with_preference("udp.port", UDP_PORT_LMP_DEFAULT, lmp_handle);
}
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/
|