aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rsvp.c
blob: f389180f6a3e51a725866db3a775b9f42860ab2a (plain)
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
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
/* packet-rsvp.c
 * Routines for RSVP packet disassembly
 *
 * (c) Copyright Ashok Narayanan <ashokn@cisco.com>
 *
 * $Id$
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

/*
 * NOTES
 *
 * This module defines routines to disassemble RSVP packets, as defined in
 * RFC 2205. All objects from RFC2205 are supported, in IPv4 and IPv6 mode.
 * In addition, the Integrated Services traffic specification objects
 * defined in RFC2210 are also supported.
 *
 * IPv6 support is not completely tested
 *
 * Mar 3, 2000: Added support for MPLS/TE objects, as defined in
 * <draft-ietf-mpls-rsvp-lsp-tunnel-04.txt>
 *
 * May 6, 2004: Added support for E-NNI objects, as defined in
 * <OIF-E-NNI-01.0>   (Roberto Morro)
 * <roberto.morro[AT]tilab.com>
 *
 * May 6, 2004: Modified some UNI objects, as defined in
 * <OIF2003.249.09>   (Roberto Morro)
 * <roberto.morro[AT]tilab.com>
 *
 * June 2, 2005: Modified more UNI objects to show correct TNA
 * addresses; Fixed LSP interface ID subobject (Richard Rabbat)
 * <richard[AT]us.fujitsu.com>
 *
 * July 25, 2005: improved ERROR and LABEL_SET objects dissector;
 * new ASSOCIATION object dissector (Roberto Morro)
 * <roberto.morro[AT]tilab.com>
 *
 * August 22, 2005: added support for tapping and conversations.
 * (Manu Pathak) <mapathak[AT]cisco.com>
 *
 * July 4, 2006: added support for RFC4124; new CLASSTYPE object dissector
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 * June 9, 2007: added support for draft-ietf-ccamp-ethernet-traffic-parameters-02
 * and draft-ietf-ccamp-lsp-hierarchy-bis-02; added support for NOTIFY_REQUEST
 * and RECOVERY_LABEL objects (Roberto Morro) * <roberto.morro[AT]tilab.com>
 *
 * Oct 21, 2009: add support for RFC4328, new G.709 traffic parameters,
 * update gpid, switching and encoding type values to actual IANA numbers.
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 * Gen 20, 2010: add support for ERROR_STRING IF_ID TLV (see RFC 4783)
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 * Feb 12, 2010: add support for generalized label interpretation: SUKLM
 * format for SONET/SDH label (RFC 4606), t3t2t1 format for G.709 ODUk label
 * (RFC 4328), G.694 format for lambda label (draft-ietf-ccamp-gmpls-g-694-lamb
 * da-labels-05).  Add related user preference option.
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 * Dec 3, 2010: add support for vendor private class object and ERO/RRO
 * sub-object (see RFC 3936).
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 * Dec 21, 2010: add new PROTECTION obj c-type 2 (RFC4872),
 * new TLVs for IF_ID (RFC4920), Path Key subobj in ERO (RFC5520),
 * new ASSOCIATION obj c-type 4 (oif2008.389), new LSP_ATTRIBUTES and
 * LSP_REQUIRED_ATTRIBUTES objects (RFC5420), improved ERROR object dissection,
 * new ADMIN_STATUS flags and fix to conversation (not applied to ACK, SREFRESH
 * and HELLO messages).
 * (Roberto Morro) <roberto.morro[AT]telecomitalia.it>
 *
 * Jul 20, 2013: add support for Exclude Routes (XRO) (see RFC 4874)
 * (FF) <francesco.fondelli[AT]gmail.com>
 *
 */


#include "config.h"

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#include <glib.h>

#include <epan/packet.h>
#include <epan/exceptions.h>
#include <prefs.h>
#include <epan/in_cksum.h>
#include <epan/etypes.h>
#include <epan/ipproto.h>
#include <epan/conversation.h>
#include <epan/tap.h>
#include <epan/sminmpec.h>
#include <epan/wmem/wmem.h>

#include "packet-rsvp.h"
#include "packet-ip.h"
#include "packet-diffserv-mpls-common.h"
#include "packet-osi.h"

/* RSVP over UDP encapsulation */
#define UDP_PORT_PRSVP 3455

void proto_register_rsvp(void);
void proto_reg_handoff_rsvp(void);

static int proto_rsvp = -1;

static int hf_rsvp_error_flags = -1;
static int hf_rsvp_error_flags_path_state_removed = -1;
static int hf_rsvp_error_flags_not_guilty = -1;
static int hf_rsvp_error_flags_in_place = -1;
static int hf_rsvp_eth_tspec_tlv_color_mode = -1;
static int hf_rsvp_eth_tspec_tlv_coupling_flag = -1;
static int hf_rsvp_sender_tspec_standard_contiguous_concatenation = -1;
static int hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation = -1;
static int hf_rsvp_sender_tspec_regenerator_section = -1;
static int hf_rsvp_sender_tspec_multiplex_section = -1;
static int hf_rsvp_sender_tspec_J0_transparency = -1;
static int hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency = -1;
static int hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency = -1;
static int hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency = -1;
static int hf_rsvp_sender_tspec_K1_K2_transparency = -1;
static int hf_rsvp_sender_tspec_E1_transparency = -1;
static int hf_rsvp_sender_tspec_F1_transparency = -1;
static int hf_rsvp_sender_tspec_E2_transparency = -1;
static int hf_rsvp_sender_tspec_B1_transparency = -1;
static int hf_rsvp_sender_tspec_B2_transparency = -1;
static int hf_rsvp_sender_tspec_M0_transparency = -1;
static int hf_rsvp_sender_tspec_M1_transparency = -1;
static int hf_rsvp_flowspec_standard_contiguous_concatenation = -1;
static int hf_rsvp_flowspec_arbitrary_contiguous_concatenation = -1;
static int hf_rsvp_flowspec_regenerator_section = -1;
static int hf_rsvp_flowspec_multiplex_section = -1;
static int hf_rsvp_flowspec_J0_transparency = -1;
static int hf_rsvp_flowspec_SOH_RSOH_DCC_transparency = -1;
static int hf_rsvp_flowspec_LOH_MSOH_DCC_transparency = -1;
static int hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency = -1;
static int hf_rsvp_flowspec_K1_K2_transparency = -1;
static int hf_rsvp_flowspec_E1_transparency = -1;
static int hf_rsvp_flowspec_F1_transparency = -1;
static int hf_rsvp_flowspec_E2_transparency = -1;
static int hf_rsvp_flowspec_B1_transparency = -1;
static int hf_rsvp_flowspec_B2_transparency = -1;
static int hf_rsvp_flowspec_M0_transparency = -1;
static int hf_rsvp_flowspec_M1_transparency = -1;
static int hf_rsvp_integrity_flags_handshake = -1;
static int hf_rsvp_sa_flags_local = -1;
static int hf_rsvp_sa_flags_label = -1;
static int hf_rsvp_sa_flags_se_style = -1;
static int hf_rsvp_sa_flags_bandwidth = -1;
static int hf_rsvp_sa_flags_node = -1;
static int hf_rsvp_rro_flags_local_avail = -1;
static int hf_rsvp_rro_flags_local_in_use = -1;
static int hf_rsvp_rro_flags_bandwidth = -1;
static int hf_rsvp_rro_flags_node = -1;
static int hf_rsvp_rro_flags_node_address = -1;
static int hf_rsvp_rro_flags_backup_tunnel_bandwidth = -1;
static int hf_rsvp_rro_flags_backup_tunnel_hop = -1;
static int hf_rsvp_rro_flags_global_label = -1;
static int hf_rsvp_lsp_attr_e2e = -1;
static int hf_rsvp_lsp_attr_boundary = -1;
static int hf_rsvp_lsp_attr_segment = -1;
static int hf_rsvp_lsp_attr_integrity = -1;
static int hf_rsvp_lsp_attr_contiguous = -1;
static int hf_rsvp_lsp_attr_stitching = -1;
static int hf_rsvp_lsp_attr_preplanned = -1;
static int hf_rsvp_lsp_attr_nophp = -1;
static int hf_rsvp_lsp_attr_oobmap = -1;
static int hf_rsvp_lsp_attr_entropy = -1;
static int hf_rsvp_lsp_attr_srlgcollect = -1;
static int hf_rsvp_lsp_attr_costcollect = -1;
static int hf_rsvp_lsp_attr_latcollect = -1;
static int hf_rsvp_lsp_attr_latvarcollect = -1;
static int hf_rsvp_gen_uni_direction = -1;
static int hf_rsvp_protection_info_flags_secondary_lsp = -1;
static int hf_rsvp_pi_link_flags_extra_traffic = -1;
static int hf_rsvp_pi_link_flags_unprotected = -1;
static int hf_rsvp_pi_link_flags_shared = -1;
static int hf_rsvp_pi_link_flags_dedicated1_1 = -1;
static int hf_rsvp_pi_link_flags_dedicated1plus1 = -1;
static int hf_rsvp_pi_link_flags_enhanced = -1;
static int hf_rsvp_pi_link_flags_extra = -1;
static int hf_rsvp_pi_link_flags_dedicated_1_1 = -1;
static int hf_rsvp_pi_link_flags_dedicated_1plus1 = -1;
static int hf_rsvp_rfc4872_secondary = -1;
static int hf_rsvp_rfc4872_protecting = -1;
static int hf_rsvp_rfc4872_notification_msg = -1;
static int hf_rsvp_rfc4872_operational = -1;
static int hf_rsvp_pi_lsp_flags_full_rerouting = -1;
static int hf_rsvp_pi_lsp_flags_rerouting_extra = -1;
static int hf_rsvp_pi_lsp_flags_1_n_protection = -1;
static int hf_rsvp_pi_lsp_flags_1plus1_unidirectional = -1;
static int hf_rsvp_pi_lsp_flags_1plus1_bidirectional = -1;
static int hf_rsvp_protection_info_in_place = -1;
static int hf_rsvp_protection_info_required = -1;
static int hf_rsvp_pi_seg_flags_full_rerouting = -1;
static int hf_rsvp_pi_seg_flags_rerouting_extra = -1;
static int hf_rsvp_pi_seg_flags_1_n_protection = -1;
static int hf_rsvp_pi_seg_flags_1plus1_unidirectional = -1;
static int hf_rsvp_pi_seg_flags_1plus1_bidirectional = -1;
static int hf_rsvp_frr_flags_one2one_backup = -1;
static int hf_rsvp_frr_flags_facility_backup = -1;
static int hf_rsvp_c_type = -1;
static int hf_rsvp_3gpp_obj_tid = -1;
static int hf_rsvp_3gpp_obj_ie_len = -1;
static int hf_rsvp_3gpp_obj_ie_type = -1;
static int hf_rsvp_3gpp_obj_ue_ipv4_addr = -1;
static int hf_rsvp_3gpp_obj_ue_ipv6_addr = -1;
static int hf_rsvp_3gpp_obj_tft_d = -1;
static int hf_rsvp_3gpp_obj_tft_ns = -1;
static int hf_rsvp_3gpp_obj_tft_sr_id = -1;
static int hf_rsvp_3gpp_obj_tft_p = -1;
static int hf_rsvp_3gpp_obj_tft_opcode = -1;
static int hf_rsvp_3gpp_obj_tft_n_pkt_flt = -1;
static int hf_rsvp_3gpp_obj_flow_id = -1;
static int hf_rsvp_3gpp_obj_pf_ev_prec = -1;
static int hf_rsvp_3gpp_obj_pf_len = -1;
static int hf_rsvp_3gpp_obj_pf_type = -1;
static int hf_rsvp_3gpp_obj_pf_cont_len = -1;
static int hf_rsvp_3gpp_obj_pf_comp_type_id = -1;
static int hf_rsvp_3gpp_obj_pf_src_ipv4 = -1;
static int hf_rsvp_3gpp_obj_pf_dst_ipv4 = -1;
static int hf_rsvp_3gpp_obj_pf_ipv4_mask = -1;
static int hf_rsvp_3gpp_obj_pf_src_ipv6 = -1;
static int hf_rsvp_3gpp_obj_pf_dst_ipv6 = -1;
static int hf_rsvp_3gpp_obj_pf_ipv6_prefix_length = -1;
static int hf_rsvp_3gpp_obj_pf_prot_next = -1;
static int hf_rsvp_3gpp_obj_pf_dst_port = -1;
static int hf_rsvp_3gpp_obj_pf_src_port = -1;
static int hf_rsvp_3gpp_obj_pf_ipsec_spi = -1;
static int hf_rsvp_3gpp_obj_pf_tos_tc = -1;
static int hf_rsvp_3gpp_obj_pf_flow_lbl = -1;
static int hf_rsvp_3gpp_obj_pf_ipv6 = -1;
static int hf_rsvp_3gpp_obj_pf_treatment = -1;
static int hf_rsvp_3gpp_obj_pf_hint = -1;
static int hf_rsvp_3gpp_obj_tft_qos_list_len = -1;
static int hf_rsvp_3gpp_r_qos_blob_len = -1;
static int hf_rsvp_3gpp_r_qos_blob_flow_pri = -1;
static int hf_rsvp_3gpp_r_qos_blob_num_qos_att_set = -1;
static int hf_rsvp_3gpp_qos_att_set_len = -1;
static int hf_rsvp_3gpp_qos_attribute_set_id = -1;
static int hf_rsvp_3gpp_qos_attribute_verbose = -1;
static int hf_rsvp_3gpp_qos_attribute_prof_id = -1;
static int hf_rsvp_3gpp_qos_attribute_traff_cls = -1;
static int hf_rsvp_3gpp_qos_attribute_peak_rate = -1;
static int hf_rsvp_3gpp_qos_attribute_bucket_size = -1;
static int hf_rsvp_3gpp_qos_attribute_token_rate = -1;
static int hf_rsvp_3gpp_qos_attribute_max_latency = -1;
static int hf_rsvp_3gpp_qos_attribute_max_loss_rte = -1;
static int hf_rsvp_3gpp_qos_attribute_delay_var_sensitive = -1;
static int hf_rsvp_3gpp_qos_attribute_reserved = -1;
static int hf_rsvp_3gpp_r_qos_blob = -1;
static int hf_rsvp_3gpp_qos_result = -1;
static int hf_rsvp_xro_sobj_lbit = -1;
static int hf_rsvp_xro_sobj_type = -1;
static int hf_rsvp_xro_sobj_len = -1;
static int hf_rsvp_xro_sobj_ipv4_addr = -1;
static int hf_rsvp_xro_sobj_ipv4_prefix = -1;
static int hf_rsvp_xro_sobj_ipv4_attr = -1;
static int hf_rsvp_xro_sobj_ipv6_addr = -1;
static int hf_rsvp_xro_sobj_ipv6_prefix = -1;
static int hf_rsvp_xro_sobj_ipv6_attr = -1;
static int hf_rsvp_xro_sobj_srlg_id = -1;
static int hf_rsvp_xro_sobj_srlg_res = -1;
static int hf_rsvp_private_data = -1;
static int hf_rsvp_juniper_numtlvs = -1;
static int hf_rsvp_juniper_padlength = -1;
static int hf_rsvp_juniper_type = -1;
static int hf_rsvp_juniper_length = -1;
static int hf_rsvp_juniper_attrib_cos = -1;
static int hf_rsvp_juniper_attrib_metric1 = -1;
static int hf_rsvp_juniper_attrib_metric2 = -1;
static int hf_rsvp_juniper_attrib_ccc_status = -1;
static int hf_rsvp_juniper_attrib_path = -1;
static int hf_rsvp_juniper_attrib_unknown = -1;
static int hf_rsvp_juniper_unknown = -1;
static int hf_rsvp_juniper_pad = -1;
static int hf_rsvp_unknown_data = -1;

static int rsvp_tap = -1;

/*
 * All RSVP packets belonging to a particular flow  belong to the same
 * conversation. The following structure definitions are for auxillary
 * structures which have all the relevant flow information to make up the
 * RSVP five-tuple. Note that the values of the five-tuple are determined
 * from the session object and sender template/filter spec for PATH/RESV
 * messages.
 * Update rsvp_request_equal() when you add stuff here. You might also
 * have to update rsvp_request_hash().
 * TODO: Support for IPv6 conversations.
 */

typedef struct rsvp_session_ipv4_info {
    address destination;
    guint8 protocol;
    guint16 udp_dest_port;
} rsvp_session_ipv4_info;

typedef struct rsvp_session_ipv6_info {
    /* not supported yet */

    guint8 dummy;
} rsvp_session_ipv6_info;

typedef struct rsvp_session_ipv4_lsp_info {
    address destination;
    guint16 udp_dest_port;
    guint32 ext_tunnel_id;
} rsvp_session_ipv4_lsp_info;

typedef struct rsvp_session_agg_ipv4_info {
    address destination;
    guint8 dscp;
} rsvp_session_agg_ipv4_info;

typedef struct rsvp_session_ipv4_uni_info {
    address destination;
    guint16 udp_dest_port;
    guint32 ext_tunnel_id;
} rsvp_session_ipv4_uni_info;

typedef struct rsvp_session_ipv4_enni_info {
    address destination;
    guint16 udp_dest_port;
    guint32 ext_tunnel_id;
} rsvp_session_ipv4_enni_info;

typedef struct rsvp_template_filter_info {
    address source;
    guint16 udp_source_port;
} rsvp_template_filter_info;

/*
 * The actual request key consists of a union of the various session objects
 * (which are uniquely identified based on the session type), and the
 * source_info structure, which has the information derived from the sender
 * template or the filter spec.
 * The request key is populated by copying the information from the
 * rsvp_conversation_info structure (rsvph), which in turn is populated when
 * the session, filter and sender template objects are dissected.
 */
struct rsvp_request_key {
    guint32 session_type;

    union { /* differentiated by session_type field */
        rsvp_session_ipv4_info session_ipv4;
        rsvp_session_ipv6_info session_ipv6;
        rsvp_session_ipv4_lsp_info session_ipv4_lsp;
        rsvp_session_agg_ipv4_info session_agg_ipv4;
        rsvp_session_ipv4_uni_info session_ipv4_uni;
        rsvp_session_ipv4_enni_info session_ipv4_enni;
    } u;

    rsvp_template_filter_info source_info;
    guint32 conversation;
};

/*
 * At present, there is nothing particularly important that we need to
 * store for the request value for each rsvp_request_key, so we just
 * store the unique 32-bit identifier internally allocated for the key
 * (and stored in the conversation attribute of rsvp_request_key above.
 * If this changes in the future, then other stuff can be added here.
 */
struct rsvp_request_val {
    guint32 value;
};

/*
 * Initialize the conversation related data structures.
 */
static GHashTable *rsvp_request_hash = NULL;

/*
 * The list of tree types
 */
enum {
    TT_RSVP,
    TT_HDR,
    TT_SESSION,
    TT_HOP,
    TT_HOP_SUBOBJ,
    TT_TIME_VALUES,
    TT_ERROR,
    TT_ERROR_SUBOBJ,
    TT_ERROR_FLAGS,
    TT_SCOPE,
    TT_STYLE,
    TT_CONFIRM,
    TT_SENDER_TEMPLATE,
    TT_FILTER_SPEC,
    TT_TSPEC,
    TT_TSPEC_SUBTREE,
    TT_FLOWSPEC,
    TT_FLOWSPEC_SUBTREE,
    TT_ETHSPEC_SUBTREE,
    TT_ADSPEC,
    TT_ADSPEC_SUBTREE,
    TT_INTEGRITY,
    TT_INTEGRITY_FLAGS,
    TT_DCLASS,
    TT_LSP_TUNNEL_IF_ID,
    TT_LSP_TUNNEL_IF_ID_SUBTREE,
    TT_POLICY,
    TT_MESSAGE_ID,
    TT_MESSAGE_ID_ACK,
    TT_MESSAGE_ID_LIST,
    TT_LABEL,
    TT_LABEL_SET,
    TT_LABEL_REQUEST,
    TT_SESSION_ATTRIBUTE,
    TT_SESSION_ATTRIBUTE_FLAGS,
    TT_HELLO_OBJ,
    TT_EXPLICIT_ROUTE,
    TT_EXPLICIT_ROUTE_SUBOBJ,
    TT_EXCLUDE_ROUTE,
    TT_EXCLUDE_ROUTE_SUBOBJ,
    TT_RECORD_ROUTE,
    TT_RECORD_ROUTE_SUBOBJ,
    TT_RECORD_ROUTE_SUBOBJ_FLAGS,
    TT_ADMIN_STATUS,
    TT_ADMIN_STATUS_FLAGS,
    TT_LSP_ATTRIBUTES,
    TT_LSP_ATTRIBUTES_FLAGS,
    TT_ASSOCIATION,
    TT_GEN_UNI,
    TT_GEN_UNI_SUBOBJ,
    TT_CALL_ID,
    TT_3GPP2_OBJECT,
    TT_BUNDLE_COMPMSG,
    TT_RESTART_CAP,
    TT_PROTECTION_INFO,
    TT_PROTECTION_INFO_LINK,
    TT_PROTECTION_INFO_LSP,
    TT_PROTECTION_INFO_SEG,
    TT_FAST_REROUTE,
    TT_FAST_REROUTE_FLAGS,
    TT_DETOUR,
    TT_DIFFSERV,
    TT_DIFFSERV_MAP,
    TT_DIFFSERV_MAP_PHBID,
    TT_CLASSTYPE,
    TT_PRIVATE_CLASS,
    TT_JUNIPER,
    TT_UNKNOWN_CLASS,
    TT_3GPP_OBJ_FLOW,
    TT_3GPP_OBJ_QOS,
    TT_3GPP_OBJ_QOS_SUB_BLOB,
    TT_3GPP_OBJ_T2,
    TT_3GPP_OBJ_HO,

    TT_MAX
};
static gint ett_treelist[TT_MAX];
#define TREE(X) ett_treelist[(X)]

/* Should we dissect bundle messages? */
static gboolean rsvp_bundle_dissect = TRUE;

/* FF: How should we dissect generalized label? */
static const enum_val_t rsvp_generalized_label_options[] = {
    /* see RFC 3471 Section 3.2.1.2 */
    { "data", "data (no interpretation)", 1 },
    /* see RFC 4606 Section 3 */
    { "SUKLM", "SONET/SDH (\"S, U, K, L, M\" scheme)", 2 },
    /* see I-D draft-ietf-ccamp-gmpls-g-694-lambda-labels-05 */
    { "G694", "Wavelength Label (G.694 frequency grid)", 3 },
    /* see RFC 4328 Section 4.1 */
    { "G709", "ODUk Label", 4 },
    { NULL, NULL, 0 }
};

static guint rsvp_generalized_label_option = 1;

/*
 * RSVP message types.
 * See
 *
 *      http://www.iana.org/assignments/rsvp-parameters
 */
typedef enum {
    RSVP_MSG_PATH          =  1,        /* RFC 2205 */
    RSVP_MSG_RESV,                      /* RFC 2205 */
    RSVP_MSG_PERR,                      /* RFC 2205 */
    RSVP_MSG_RERR,                      /* RFC 2205 */
    RSVP_MSG_PTEAR,                     /* RFC 2205 */
    RSVP_MSG_RTEAR,                     /* RFC 2205 */
    RSVP_MSG_CONFIRM,                   /* XXX - DREQ, RFC 2745? */
                                        /* 9 is DREP, RFC 2745 */
    RSVP_MSG_RTEAR_CONFIRM = 10,        /* from Fred Baker at Cisco */
                                        /* 11 is unassigned */
    RSVP_MSG_BUNDLE        = 12,        /* RFC 2961 */
    RSVP_MSG_ACK,                       /* RFC 2961 */
                                        /* 14 is reserved */
    RSVP_MSG_SREFRESH      = 15,        /* RFC 2961 */
                                        /* 16, 17, 18, 19 not listed */
    RSVP_MSG_HELLO         = 20,        /* RFC 3209 */
    RSVP_MSG_NOTIFY                     /* [RFC3473] */
                                        /* 25 is Integrity Challenge RFC 2747, RFC 3097 */
                                        /* 26 is Integrity Response RFC 2747, RFC 3097 */
                                        /* 66 is DSBM_willing [SBM] */
                                        /* 67 is I_AM_DSBM [SBM] */
                                        /* [SBM] is Subnet Bandwidth Manager ID from July 1997 */
} rsvp_message_types;

static const value_string message_type_vals[] = {
    { RSVP_MSG_PATH,            "PATH Message. "},
    { RSVP_MSG_RESV,            "RESV Message. "},
    { RSVP_MSG_PERR,            "PATH ERROR Message. "},
    { RSVP_MSG_RERR,            "RESV ERROR Message. "},
    { RSVP_MSG_PTEAR,           "PATH TEAR Message. "},
    { RSVP_MSG_RTEAR,           "RESV TEAR Message. "},
    { RSVP_MSG_CONFIRM,         "CONFIRM Message. "},
    { RSVP_MSG_RTEAR_CONFIRM,   "RESV TEAR CONFIRM Message. "},
    { RSVP_MSG_BUNDLE,          "BUNDLE Message. "},
    { RSVP_MSG_ACK,             "ACK Message. "},
    { RSVP_MSG_SREFRESH,        "SREFRESH Message. "},
    { RSVP_MSG_HELLO,           "HELLO Message. "},
    { RSVP_MSG_NOTIFY,          "NOTIFY Message. "},
    { 0, NULL}
};
static value_string_ext message_type_vals_ext = VALUE_STRING_EXT_INIT(message_type_vals);

/*
 * FF: please keep this list in sync with
 * http://www.iana.org/assignments/rsvp-parameters
 * Registry Name: 'Class'
 */
enum rsvp_classes {
    RSVP_CLASS_NULL              =   0,
    RSVP_CLASS_SESSION,

    RSVP_CLASS_HOP               =   3,
    RSVP_CLASS_INTEGRITY,
    RSVP_CLASS_TIME_VALUES,
    RSVP_CLASS_ERROR,
    RSVP_CLASS_SCOPE,
    RSVP_CLASS_STYLE,
    RSVP_CLASS_FLOWSPEC,
    RSVP_CLASS_FILTER_SPEC,
    RSVP_CLASS_SENDER_TEMPLATE,
    RSVP_CLASS_SENDER_TSPEC,
    RSVP_CLASS_ADSPEC,
    RSVP_CLASS_POLICY,
    RSVP_CLASS_CONFIRM,
    RSVP_CLASS_LABEL,
    RSVP_CLASS_HOP_COUNT,
    RSVP_CLASS_STRICT_SOURCE_ROUTE,
    RSVP_CLASS_LABEL_REQUEST     =  19,
    RSVP_CLASS_EXPLICIT_ROUTE,
    RSVP_CLASS_RECORD_ROUTE,

    RSVP_CLASS_HELLO,

    RSVP_CLASS_MESSAGE_ID,
    RSVP_CLASS_MESSAGE_ID_ACK,
    RSVP_CLASS_MESSAGE_ID_LIST,

    /* 26-29  Unassigned */

    RSVP_CLASS_DIAGNOSTIC        = 30,
    RSVP_CLASS_ROUTE,
    RSVP_CLASS_DIAG_RESPONSE,
    RSVP_CLASS_DIAG_SELECT,
    RSVP_CLASS_RECOVERY_LABEL,
    RSVP_CLASS_UPSTREAM_LABEL,
    RSVP_CLASS_LABEL_SET,
    RSVP_CLASS_PROTECTION,

    /* 38-41  Unassigned */
    RSVP_CLASS_DSBM_IP_ADDRESS   = 42,
    RSVP_CLASS_SBM_PRIORITY,
    RSVP_CLASS_DSBM_TIMER_INTERVALS,
    RSVP_CLASS_SBM_INFO,

    /* 46-62  Unassigned */

    RSVP_CLASS_DETOUR            = 63,
    RSVP_CLASS_CHALLENGE,
    RSVP_CLASS_DIFFSERV,
    RSVP_CLASS_CLASSTYPE, /* FF: RFC4124 */
    RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES,

    /* 68-123  Unassigned */

    RSVP_CLASS_VENDOR_PRIVATE_1  = 124,
    RSVP_CLASS_VENDOR_PRIVATE_2  = 125,
    RSVP_CLASS_VENDOR_PRIVATE_3  = 126,
    RSVP_CLASS_VENDOR_PRIVATE_4  = 127,

    RSVP_CLASS_NODE_CHAR         = 128,
    RSVP_CLASS_SUGGESTED_LABEL,
    RSVP_CLASS_ACCEPTABLE_LABEL_SET,
    RSVP_CLASS_RESTART_CAP,

    /* 132-160 Unassigned */

    /* 166-187 Unassigned */

    RSVP_CLASS_VENDOR_PRIVATE_5  = 188,
    RSVP_CLASS_VENDOR_PRIVATE_6  = 189,
    RSVP_CLASS_VENDOR_PRIVATE_7  = 190,
    RSVP_CLASS_VENDOR_PRIVATE_8  = 191,

    RSVP_CLASS_SESSION_ASSOC     = 192,
    RSVP_CLASS_LSP_TUNNEL_IF_ID,
    /* 194 Unassigned */
    RSVP_CLASS_NOTIFY_REQUEST    = 195,
    RSVP_CLASS_ADMIN_STATUS,
    RSVP_CLASS_LSP_ATTRIBUTES,
    RSVP_CLASS_ALARM_SPEC,
    RSVP_CLASS_ASSOCIATION,

    /* 203-204  Unassigned */
    /*
        204 Proprietary Juniper LSP properties
        https://www.juniper.net/techpubs/en_US/junos12.1/information-products/topic-collections/nog-mpls-logs/topic-20284.html
     */
    RSVP_CLASS_JUNIPER_PROPERTIES = 204,
    RSVP_CLASS_FAST_REROUTE      = 205,
    /* 206 Unassigned */
    RSVP_CLASS_SESSION_ATTRIBUTE = 207,
    /* 208-223 Unassigned */
    /*
      Class Numbers 224-255 are assigned by IANA using FCFS allocation.
      RSVP will silently ignore, but FORWARD an object with a Class Number
      in this range that it does not understand.
    */
    /* 224  Unassigned */
    RSVP_CLASS_DCLASS            = 225,
    RSVP_CLASS_PACKETCABLE_EXTENSIONS,
    RSVP_CLASS_ATM_SERVICECLASS,
    RSVP_CLASS_CALL_OPS,
    RSVP_CLASS_GENERALIZED_UNI,
    RSVP_CLASS_CALL_ID,
    RSVP_CLASS_3GPP2_OBJECT,
    RSVP_CLASS_EXCLUDE_ROUTE,

    /* 233-251 Unassigned */

    RSVP_CLASS_VENDOR_PRIVATE_9  = 252,
    RSVP_CLASS_VENDOR_PRIVATE_10 = 253,
    RSVP_CLASS_VENDOR_PRIVATE_11 = 254,
    RSVP_CLASS_VENDOR_PRIVATE_12 = 255
};

/* XXX: are any/all of the "missing" values below supposed to have value-strings */
static const value_string rsvp_class_vals[] = {
    { RSVP_CLASS_NULL,                  "NULL object"},
    { RSVP_CLASS_SESSION,               "SESSION object"},

    { RSVP_CLASS_HOP,                   "HOP object"},
    { RSVP_CLASS_INTEGRITY,             "INTEGRITY object"},
    { RSVP_CLASS_TIME_VALUES,           "TIME VALUES object"},
    { RSVP_CLASS_ERROR,                 "ERROR object"},
    { RSVP_CLASS_SCOPE,                 "SCOPE object"},
    { RSVP_CLASS_STYLE,                 "STYLE object"},
    { RSVP_CLASS_FLOWSPEC,              "FLOWSPEC object"},
    { RSVP_CLASS_FILTER_SPEC,           "FILTER SPEC object"},
    { RSVP_CLASS_SENDER_TEMPLATE,       "SENDER TEMPLATE object"},
    { RSVP_CLASS_SENDER_TSPEC,          "SENDER TSPEC object"},
    { RSVP_CLASS_ADSPEC,                "ADSPEC object"},
    { RSVP_CLASS_POLICY,                "POLICY object"},
    { RSVP_CLASS_CONFIRM,               "CONFIRM object"},
    { RSVP_CLASS_LABEL,                 "LABEL object"},
    { RSVP_CLASS_HOP_COUNT,             "HOP_COUNT object"},
    { RSVP_CLASS_STRICT_SOURCE_ROUTE,   "STRICT_SOURCE_ROUTE object"},
    { RSVP_CLASS_LABEL_REQUEST,         "LABEL REQUEST object"},
    { RSVP_CLASS_EXPLICIT_ROUTE,        "EXPLICIT ROUTE object"},
    { RSVP_CLASS_RECORD_ROUTE,          "RECORD ROUTE object"},

    { RSVP_CLASS_HELLO,                 "HELLO object"},

    { RSVP_CLASS_MESSAGE_ID,            "MESSAGE-ID object"},
    { RSVP_CLASS_MESSAGE_ID_ACK,        "MESSAGE-ID ACK/NACK object"},
    { RSVP_CLASS_MESSAGE_ID_LIST,       "MESSAGE-ID LIST object"},

/*
    RSVP_CLASS_DIAGNOSTIC
    RSVP_CLASS_ROUTE,
    RSVP_CLASS_DIAG_RESPONSE,
    RSVP_CLASS_DIAG_SELECT,
*/

    { RSVP_CLASS_RECOVERY_LABEL,        "RECOVERY-LABEL object"},
    { RSVP_CLASS_UPSTREAM_LABEL,        "UPSTREAM-LABEL object"},
    { RSVP_CLASS_LABEL_SET,             "LABEL-SET object"},
    { RSVP_CLASS_PROTECTION,            "PROTECTION object"},

/*
    RSVP_CLASS_DSBM_IP_ADDRESS
    RSVP_CLASS_SBM_PRIORITY,
    RSVP_CLASS_DSBM_TIMER_INTERVALS,
    RSVP_CLASS_SBM_INFO,
*/

    { RSVP_CLASS_DETOUR,                "DETOUR object"},
/*
    RSVP_CLASS_CHALLENGE,
*/
    { RSVP_CLASS_DIFFSERV,              "DIFFSERV object"},
    { RSVP_CLASS_CLASSTYPE,             "CLASSTYPE object"},
/*
    RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES,
*/

    { RSVP_CLASS_VENDOR_PRIVATE_1,      "VENDOR PRIVATE object (0bbbbbbb: "
                                        "reject if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_2,      "VENDOR PRIVATE object (0bbbbbbb: "
                                         "reject if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_3,      "VENDOR PRIVATE object (0bbbbbbb: "
                                         "reject if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_4,      "VENDOR PRIVATE object (0bbbbbbb: "
                                         "reject if unknown)"},

/*
    RSVP_CLASS_NODE_CHAR
*/
    { RSVP_CLASS_SUGGESTED_LABEL,       "SUGGESTED-LABEL object"},
    { RSVP_CLASS_ACCEPTABLE_LABEL_SET,  "ACCEPTABLE-LABEL-SET object"},
    { RSVP_CLASS_RESTART_CAP,           "RESTART-CAPABILITY object"},

    { RSVP_CLASS_VENDOR_PRIVATE_5,      "VENDOR PRIVATE object (10bbbbbb: "
                                         "ignore if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_6,      "VENDOR PRIVATE object (10bbbbbb: "
                                         "ignore if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_7,      "VENDOR PRIVATE object (10bbbbbb: "
                                         "ignore if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_8,      "VENDOR PRIVATE object (10bbbbbb: "
                                         "ignore if unknown)"},
/*
    RSVP_CLASS_SESSION_ASSOC
*/
    { RSVP_CLASS_LSP_TUNNEL_IF_ID,      "LSP-TUNNEL INTERFACE-ID object"},

    { RSVP_CLASS_NOTIFY_REQUEST,        "NOTIFY-REQUEST object"},
    { RSVP_CLASS_ADMIN_STATUS,          "ADMIN-STATUS object"},
    { RSVP_CLASS_LSP_ATTRIBUTES,        "LSP ATTRIBUTES object"},
/*
    RSVP_CLASS_ALARM_SPEC,
*/
    { RSVP_CLASS_ASSOCIATION,           "ASSOCIATION object"},

    { RSVP_CLASS_JUNIPER_PROPERTIES,    "Juniper properties object"},
    { RSVP_CLASS_FAST_REROUTE,          "FAST-REROUTE object"},

    { RSVP_CLASS_SESSION_ATTRIBUTE,     "SESSION ATTRIBUTE object"},

    { RSVP_CLASS_DCLASS,                "DCLASS object"},
/*
    RSVP_CLASS_PACKETCABLE_EXTENSIONS,
    RSVP_CLASS_ATM_SERVICECLASS,
    RSVP_CLASS_CALL_OPS,
*/
    { RSVP_CLASS_GENERALIZED_UNI,       "GENERALIZED-UNI object"},
    { RSVP_CLASS_CALL_ID,               "CALL-ID object"},
    { RSVP_CLASS_3GPP2_OBJECT,          "3GPP2 object"},
    { RSVP_CLASS_EXCLUDE_ROUTE,         "EXCLUDE ROUTE object"},

    { RSVP_CLASS_VENDOR_PRIVATE_9,      "VENDOR PRIVATE object (11bbbbbb: "
                                         "forward if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_10,     "VENDOR PRIVATE object (11bbbbbb: "
                                          "forward if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_11,     "VENDOR PRIVATE object (11bbbbbb: "
                                          "forward if unknown)"},
    { RSVP_CLASS_VENDOR_PRIVATE_12,     "VENDOR PRIVATE object (11bbbbbb: "
                                          "forward if unknown)"},
    { 0, NULL}
};
static value_string_ext rsvp_class_vals_ext = VALUE_STRING_EXT_INIT(rsvp_class_vals);

/*
 * RSVP error values
 */
enum rsvp_error_types {
    RSVP_ERROR_CONFIRM   = 0,
    RSVP_ERROR_ADMISSION,
    RSVP_ERROR_POLICY,
    RSVP_ERROR_NO_PATH,
    RSVP_ERROR_NO_SENDER,
    RSVP_ERROR_CONFLICT_RESV_STYLE,
    RSVP_ERROR_UNKNOWN_RESV_STYLE,
    RSVP_ERROR_CONFLICT_DEST_PORTS,
    RSVP_ERROR_CONFLICT_SRC_PORTS,
    /* 9-11 Reserved */
    RSVP_ERROR_PREEMPTED =12,
    RSVP_ERROR_UNKNOWN_CLASS,
    RSVP_ERROR_UNKNOWN_C_TYPE,
    /* 15-19 Reserved */
    RSVP_ERROR_RES_FOR_API = 20,
    RSVP_ERROR_TRAFFIC,
    RSVP_ERROR_TRAFFIC_SYSTEM,
    RSVP_ERROR_SYSTEM,
    RSVP_ERROR_ROUTING,
    RSVP_ERROR_NOTIFY,
    RSVP_ERROR_NEW_AGGR,            /* RFC3175 */
    RSVP_ERROR_DIFFSERV,
    RSVP_ERROR_DSTE,                /* RFC4124 */
    RSVP_ERROR_UNKNOWN_ATTR_TLV,    /* RFC5420 */
    RSVP_ERROR_UNKNOWN_ATTR_BIT,    /* RFC5420 */
    RSVP_ERROR_ALARMS,              /* RFC4783 */
    RSVP_ERROR_CALL_MGMT,           /* RFC4974 */
    RSVP_ERROR_USER_ERROR_SPEC,     /* RFC5284 */
    RSVP_ERROR_REROUTE,            /* RFC5710 */
    RSVP_ERROR_HO_PROC_FAIL,        /* RFC5852 */
    RSVP_ERROR_UNREC_REC_PROXY_ERR, /* RFC5946 */
    RSVP_ERROR_RSVP_OVER_MPLS_PROB, /* RFC6016 */
    RSVP_ERROR_LSP_HIER_ISSUE,      /* RFC6107 */
    RSVP_ERROR_VCAT_CALL_MGMT       /* RFC6344 */

};

static const value_string rsvp_error_codes[] = {
    { RSVP_ERROR_CONFIRM,              "Confirmation"},
    { RSVP_ERROR_ADMISSION,            "Admission Control Failure "},
    { RSVP_ERROR_POLICY,               "Policy Control Failure"},
    { RSVP_ERROR_NO_PATH,              "No PATH information for this RESV message"},
    { RSVP_ERROR_NO_SENDER,            "No sender information for this RESV message"},
    { RSVP_ERROR_CONFLICT_RESV_STYLE,  "Conflicting reservation styles"},
    { RSVP_ERROR_UNKNOWN_RESV_STYLE,   "Unknown reservation style"},
    { RSVP_ERROR_CONFLICT_DEST_PORTS,  "Conflicting destination ports"},
    { RSVP_ERROR_CONFLICT_SRC_PORTS,   "Conflicting source ports"},
    { RSVP_ERROR_PREEMPTED,            "Service preempted"},
    { RSVP_ERROR_UNKNOWN_CLASS,        "Unknown object class"},
    { RSVP_ERROR_UNKNOWN_C_TYPE,       "Unknown object C-type"},
    { RSVP_ERROR_RES_FOR_API,          "Reserved for API"},
    { RSVP_ERROR_TRAFFIC,              "Traffic Control Error"},
    { RSVP_ERROR_TRAFFIC_SYSTEM,       "Traffic Control System Error"},
    { RSVP_ERROR_SYSTEM,               "RSVP System Error"},
    { RSVP_ERROR_ROUTING,              "Routing Error"},
    { RSVP_ERROR_NOTIFY,               "RSVP Notify Error"},
    { RSVP_ERROR_NEW_AGGR,             "New aggregate needed"},
    { RSVP_ERROR_DIFFSERV,             "RSVP Diff-Serv Error"},
    { RSVP_ERROR_DSTE,                 "RSVP DiffServ-aware TE Error"},
    { RSVP_ERROR_UNKNOWN_ATTR_TLV,     "Unknown attributes TLV"},
    { RSVP_ERROR_UNKNOWN_ATTR_BIT,     "Unknown attributes bit"},
    { RSVP_ERROR_ALARMS,               "Alarms"},
    { RSVP_ERROR_CALL_MGMT,            "Call management"},
    { RSVP_ERROR_USER_ERROR_SPEC,      "User error spec"},
    { RSVP_ERROR_REROUTE,              "Reroute"},
    { RSVP_ERROR_HO_PROC_FAIL,         "Handover Procedure Failure"},
    { RSVP_ERROR_UNREC_REC_PROXY_ERR,  "Unrecoverable Receiver Proxy Error"},
    { RSVP_ERROR_RSVP_OVER_MPLS_PROB,  "RSVP over MPLS Problem"},
    { RSVP_ERROR_LSP_HIER_ISSUE,       "LSP Hierarchy Issue"},
    { RSVP_ERROR_VCAT_CALL_MGMT,       "VCAT Call Management"},

    { 0, NULL}
};
static value_string_ext rsvp_error_codes_ext = VALUE_STRING_EXT_INIT(rsvp_error_codes);

static const value_string rsvp_admission_control_error_vals[] = {
    { 1, "Delay bound cannot be met"},
    { 2, "Requested bandwidth unavailable"},
    { 3, "MTU in flowspec larger than interface MTU"},
    { 4, "LSP Admission Failure"},
    { 5, "Bad Association Type"},
    { 0, NULL}
};
static value_string_ext rsvp_admission_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_admission_control_error_vals);

static const value_string rsvp_policy_control_error_vals[] = {
    {   0, "Information reporting"},
    {   1, "Warning"},
    {   2, "Reason unknown"},
    {   3, "Generic Policy Rejection"},
    {   4, "Quota or Accounting violation"},
    {   5, "Flow was preempted"},
    {   6, "Previously installed policy expired (not refreshed)"},
    {   7, "Previous policy data was replaced & caused rejection"},
    {   8, "Policies could not be merged (multicast)"},
    {   9, "PDP down or non functioning"},
    {  10, "Third Party Server (e.g., Kerberos) unavailable"},
    {  11, "POLICY_DATA object has bad syntax"},
    {  12, "POLICY_DATA object failed Integrity Check"},
    {  13, "POLICY_ELEMENT object has bad syntax"},
    {  14, "Mandatory PE Missing (Empty PE is in the PD object)"},
    {  15, "PEP Out of resources to handle policies."},
    {  16, "PDP encountered bad RSVP objects or syntax"},
    {  17, "Service type was rejected"},
    {  18, "Reservation Style was rejected"},
    {  19, "FlowSpec was rejected (too large)"},
    {  20, "Hard Pre-empted"},
    { 100, "Unauthorized sender"},
    { 101, "Unauthorized receiver"},
    { 102, "ERR_PARTIAL_PREEMPT"},
    { 103, "Inter-domain policy failure"},
    { 104, "Inter-domain explicit route rejected"},
    {   0, NULL}
};
static value_string_ext rsvp_policy_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_policy_control_error_vals);

static const value_string rsvp_traffic_control_error_vals[] = {
    { 1, "Service conflict"},
    { 2, "Service unsupported"},
    { 3, "Bad Flowspec value"},
    { 4, "Bad Tspec value"},
    { 5, "Bad Adspec value"},
    { 0, NULL}
};
static value_string_ext rsvp_traffic_control_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_traffic_control_error_vals);

static const value_string rsvp_routing_error_vals[] = {
    {   1, "Bad EXPLICIT_ROUTE object"},
    {   2, "Bad strict node"},
    {   3, "Bad loose node"},
    {   4, "Bad initial subobject"},
    {   5, "No route available toward destination"},
    {   6, "Unacceptable label value"},
    {   7, "RRO indicated routing loops"},
    {   8, "non-RSVP-capable router stands in the path"},
    {   9, "MPLS label allocation failure"},
    {  10, "Unsupported L3PID"},
    {  11, "Label Set"},
    {  12, "Switching Type"},
    {  13, "Unassigned"},
    {  14, "Unsupported Encoding"},
    {  15, "Unsupported Link Protection"},
    {  16, "Unknown Interface Index"},
    {  17, "Unsupported LSP Protection"},
    {  18, "PROTECTION object not applicable"},
    {  19, "Bad PRIMARY_PATH_ROUTE object"},
    {  20, "PRIMARY_PATH_ROUTE object not applicable"},
    {  21, "LSP Segment Protection Failed"},
    {  22, "Re-routing limit exceeded"},
    {  23, "Unable to Branch"},
    {  24, "Unsupported LSP Integrity"},
    {  25, "P2MP Re-Merge Detected"},
    {  26, "P2MP Re-Merge Parameter Mismatch"},
    {  27, "ERO Resulted in Re-Merge"},
    {  28, "Contiguous LSP type not supported"},
    {  29, "ERO conflicts with inter-domain signaling method"},
    {  30, "Stitching unsupported"},
    {  31, "Unknown PCE-ID for PKS expansion"},
    {  32, "Unreachable PCE for PKS expansion"},
    {  33, "Unknown Path Key for PKS expansion"},
    {  34, "ERO too large for MTU"},
    {  64, "Unsupported Exclude Route Subobject Type"},
    {  65, "Inconsistent Subobject"},
    {  66, "Local Node in Exclude Route"},
    {  67, "Route Blocked by Exclude Route"},
    {  68, "XRO Too Complex"},
    {  69, "EXRS Too Complex"},
    { 100, "Diversity not available"},
    { 101, "Service level not available"},
    { 102, "Invalid/Unknown connection ID"},
    { 103, "No route available toward source (ASON)"},
    { 104, "Unacceptable interface ID (ASON)"},
    { 105, "Invalid/unknown call ID (ASON)"},
    { 106, "Invalid SPC interface ID/label (ASON)"},
    {   0, NULL}
};
static value_string_ext rsvp_routing_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_routing_error_vals);

static const value_string rsvp_notify_error_vals[] = {
    {  1, "RRO too large for MTU"},
    {  2, "RRO Notification"},
    {  3, "Tunnel locally repaired"},
    {  4, "Control Channel Active State"},
    {  5, "Control Channel Degraded State"},
    {  6, "Preferable path exists"},
    {  7, "Link maintenance required"},
    {  8, "Node maintenance required"},
    {  9, "LSP Failure"},
    { 10, "LSP recovered"},
    { 11, "LSP Local Failure"},
    { 12, "No OOB mapping received"},
    {  0, NULL}
};
static value_string_ext rsvp_notify_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_notify_error_vals);

static const value_string rsvp_diffserv_error_vals[] = {
    { 1, "Unexpected DIFFSERV object"},
    { 2, "Unsupported PHB"},
    { 3, "Invalid `EXP<->PHB mapping'"},
    { 4, "Unsupported PSC"},
    { 5, "Per-LSP context allocation failure"},
    { 0, NULL}
};
static value_string_ext rsvp_diffserv_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_error_vals);

/* FF: RFC4124 */
static const value_string rsvp_diffserv_aware_te_error_vals[] = {
    { 1, "Unexpected CLASSTYPE object"},
    { 2, "Unsupported Class-Type"},
    { 3, "Invalid Class-Type value"},
    { 4, "CT and setup priority do not form a configured TE-Class"},
    { 5, "CT and holding priority do not form a configured TE-Class"},
    { 6, "CT and setup priority do not form a configured TE-Class AND CT and holding priority do not form a configured TE-Class"},
    { 7, "Inconsistency between signaled PSC and signaled CT"},
    { 8, "Inconsistency between signaled PHBs and signaled CT"},
    { 0, NULL}
};
static value_string_ext rsvp_diffserv_aware_te_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_diffserv_aware_te_error_vals);

static const value_string rsvp_call_mgmt_error_vals[] = {
    { 1, "Call ID Contention"},
    { 2, "Connections still Exist"},
    { 3, "Unknown Call ID"},
    { 4, "Duplicate Call"},
    { 0, NULL}
};
static value_string_ext rsvp_call_mgmt_error_vals_ext = VALUE_STRING_EXT_INIT(rsvp_call_mgmt_error_vals);

/*
 * Defines the reservation style plus style-specific information that
 * is not a FLOWSPEC or FILTER_SPEC object, in a RESV message.
 */
#define RSVP_DISTINCT (1 << 3)
#define RSVP_SHARED   (2 << 3)
#define RSVP_SHARING_MASK (RSVP_DISTINCT | RSVP_SHARED)

#define RSVP_SCOPE_WILD     1
#define RSVP_SCOPE_EXPLICIT 2
#define RSVP_SCOPE_MASK     0x07

#define RSVP_WF (RSVP_SHARED   | RSVP_SCOPE_WILD)
#define RSVP_FF (RSVP_DISTINCT | RSVP_SCOPE_EXPLICIT)
#define RSVP_SE (RSVP_SHARED   | RSVP_SCOPE_EXPLICIT)

static const value_string style_vals[] = {
    { RSVP_WF, "Wildcard Filter" },
    { RSVP_FF, "Fixed Filter" },
    { RSVP_SE, "Shared-Explicit" },
    { 0,       NULL }
};

enum {
    RSVP_SESSION_TYPE_IPV4 = 1,
    RSVP_SESSION_TYPE_IPV6,

    RSVP_SESSION_TYPE_IPV4_LSP = 7,
    RSVP_SESSION_TYPE_IPV6_LSP,

    RSVP_SESSION_TYPE_AGGREGATE_IPV4 = 9,
    RSVP_SESSION_TYPE_AGGREGATE_IPV6,

    RSVP_SESSION_TYPE_IPV4_UNI = 11,
    RSVP_SESSION_TYPE_IPV4_E_NNI = 15
};

/*
 * Defines a desired QoS, in a RESV message.
 */
enum    qos_service_type {
    QOS_QUALITATIVE =     128,          /* Qualitative service */
    QOS_NULL =              6,          /* Null service (RFC2997) */
    QOS_CONTROLLED_LOAD=    5,          /* Controlled Load Service */
    QOS_GUARANTEED =        2,          /* Guaranteed service */
    QOS_TSPEC =             1           /* Traffic specification */
};

static const value_string qos_vals[] = {
    { QOS_QUALITATIVE,     "Qualitative QoS" },
    { QOS_NULL,            "Null-Service QoS" },
    { QOS_CONTROLLED_LOAD, "Controlled-load QoS" },
    { QOS_GUARANTEED,      "Guaranteed rate QoS" },
    { QOS_TSPEC,           "Traffic specification" },
    { 0, NULL }
};

static const value_string svc_vals[] = {
    { 126, "Compression Hint" },
    { 127, "Token bucket" },
    { 128, "Null Service" },
    { 130, "Guaranteed-rate RSpec" },
    { 0, NULL }
};
static value_string_ext svc_vals_ext = VALUE_STRING_EXT_INIT(svc_vals);

enum rsvp_spec_types { INTSRV = 2 };

enum intsrv_services {
    INTSRV_GENERAL     =   1,
    INTSRV_GTD         =   2,
    INTSRV_CLOAD       =   5,
    INTSRV_NULL        =   6,
    INTSRV_QUALITATIVE = 128
};

static const value_string intsrv_services_str[] = {
    { INTSRV_GENERAL,     "Default General Parameters"},
    { INTSRV_GTD,         "Guaranteed Rate"},
    { INTSRV_CLOAD,       "Controlled Load"},
    { INTSRV_NULL,        "Null Service"},
    { INTSRV_QUALITATIVE, "Null Service"},
    { 0, NULL }
};
static value_string_ext intsrv_services_str_ext = VALUE_STRING_EXT_INIT(intsrv_services_str);

#if 0
enum intsrv_field_name {
    INTSRV_NON_IS_HOPS           = 1,
    INTSRV_COMPOSED_NON_IS_HOPS,
    INTSRV_IS_HOPS,
    INTSRV_COMPOSED_IS_HOPS,
    INTSRV_PATH_BANDWIDTH,
    INTSRV_MIN_PATH_BANDWIDTH,
    INTSRV_IF_LATENCY,
    INTSRV_PATH_LATENCY,
    INTSRV_MTU,
    INTSRV_COMPOSED_MTU,

    INTSRV_TOKEN_BUCKET_TSPEC    = 127,
    INTSRV_QUALITATIVE_TSPEC     = 128,
    INTSRV_GTD_RSPEC             = 130,

    INTSRV_DELAY = 131,         /* Gtd Parameter C - Max Delay Bound - bytes */
    INTSRV_MAX_JITTER,          /* Gtd Parameter D - Max Jitter */
    INTSRV_E2E_DELAY,           /* Gtd Parameter Ctot */
    INTSRV_E2E_MAX_JITTER,      /* Gtd Parameter Dtot */
    INTSRV_SHP_DELAY,           /* Gtd Parameter Csum */
    INTSRV_SHP_MAX_JITTER       /* Gtd Parameter Dsum */
};
#endif

static const value_string adspec_params[] = {
    {   4, "IS Hop Count"},
    {   6, "Path b/w estimate"},
    {   8, "Minimum path latency"},
    {  10, "Composed MTU"},
    { 133, "End-to-end composed value for C"},
    { 134, "End-to-end composed value for D"},
    { 135, "Since-last-reshaping point composed C"},
    { 136, "Since-last-reshaping point composed D"},
    {   0, NULL }
};
static value_string_ext adspec_params_ext = VALUE_STRING_EXT_INIT(adspec_params);

/*
 * FF: please keep this list in sync with
 * http://www.iana.org/assignments/gmpls-sig-parameters
 * Registry Name: 'LSP Encoding Types'
 */
const range_string gmpls_lsp_enc_rvals[] = {
    {   1,   1, "Packet" },
    {   2,   2, "Ethernet" },
    {   3,   3, "ANSI/ETSI PDH" },
    {   4,   4, "Reserved" },
    {   5,   5, "SDH ITU-T G.707 / SONET ANSI T1.105" },
    {   6,   6, "Reserved" },
    {   7,   7, "Digital Wrapper" },
    {   8,   8, "Lambda (photonic)" },
    {   9,   9, "Fiber" },
    {  10,  10, "Reserved" },
    {  11,  11, "FiberChannel" },
    {  12,  12, "G.709 ODUk (Digital Path)" },
    {  13,  13, "G.709 Optical Channel" },
    {  14, 239, "Unassigned" },
    { 240, 255, "Experimental Usage/temporarily" },
    {   0,   0, NULL }
};

/*
 * FF: please keep this list in sync with
 * http://www.iana.org/assignments/gmpls-sig-parameters
 * Registry Name: 'Switching Types'
 */
const range_string gmpls_switching_type_rvals[] = {
    {   1,   1, "Packet-Switch Capable-1 (PSC-1)" },
    {   2,   2, "Packet-Switch Capable-2 (PSC-2)" },
    {   3,   3, "Packet-Switch Capable-3 (PSC-3)" },
    {   4,   4, "Packet-Switch Capable-4 (PSC-4)" },
    {   5,  29, "Unassigned" },
    {  30,  30, "Ethernet Virtual Private Line (EVPL)" },
    {  31,  39, "Unassigned" },
    {  40,  40, "802.1 PBB-TE" },
    {  41,  50, "Unassigned" },
    {  51,  51, "Layer-2 Switch Capable (L2SC)" },
    {  52,  99, "Unassigned" },
    { 100, 100, "Time-Division-Multiplex Capable (TDM)" },
    { 101, 124, "Unassigned" },
    { 125, 125, "Data Channel Switching Capable (DCSC)" },
    { 126, 149, "Unassigned" },
    { 150, 150, "Lambda-Switch Capable (LSC)" },
    { 151, 169, "Unassigned" },
    { 200, 200, "Fiber-Switch Capable (FSC)" },
    { 201, 255, "Unassigned" },
    {   0,   0, NULL }
};

/*
 * FF: please keep this list in sync with
 * http://www.iana.org/assignments/gmpls-sig-parameters
 * Registry Name: 'Generalized PID (G-PID)'
 */
static const range_string gmpls_gpid_rvals[] = {
    {      0,     0, "Unknown" },
    {      1,     4, "Reserved" },
    {      5,     5, "Asynchronous mapping of E4" },
    {      6,     6, "Asynchronous mapping of DS3/T3" },
    {      7,     7, "Asynchronous mapping of E3" },
    {      8,     8, "Bit synchronous mapping of E3" },
    {      9,     9, "Byte synchronous mapping of E3" },
    {     10,    10, "Asynchronous mapping of DS2/T2" },
    {     11,    11, "Bit synchronous mapping of DS2/T2" },
    {     12,    12, "Reserved" },
    {     13,    13, "Asynchronous mapping of E1" },
    {     14,    14, "Byte synchronous mapping of E1" },
    {     15,    15, "Byte synchronous mapping of 31 * DS0" },
    {     16,    16, "Asynchronous mapping of DS1/T1" },
    {     17,    17, "Bit synchronous mapping of DS1/T1" },
    {     18,    18, "Byte synchronous mapping of DS1/T1" },
    {     19,    19, "VC-11 in VC-12" },
    {     20,    21, "Reserved" },
    {     22,    22, "DS1 SF Asynchronous" },
    {     23,    23, "DS1 ESF Asynchronous" },
    {     24,    24, "DS3 M23 Asynchronous" },
    {     25,    25, "DS3 C-Bit Parity Asynchronous" },
    {     26,    26, "VT/LOVC" },
    {     27,    27, "STS SPE/HOVC" },
    {     28,    28, "POS - No Scrambling, 16 bit CRC" },
    {     29,    29, "POS - No Scrambling, 32 bit CRC" },
    {     30,    30, "POS - Scrambling, 16 bit CRC" },
    {     31,    31, "POS - Scrambling, 32 bit CRC" },
    {     32,    32, "ATM mapping" },
    {     33,    33, "Ethernet PHY" },
    {     34,    34, "SONET/SDH" },
    {     35,    35, "Reserved (SONET deprecated)" },
    {     36,    36, "Digital Wrapper" },
    {     37,    37, "Lambda" },
    {     38,    38, "ANSI/ETSI PDH" },
    {     39,    39, "Reserved" },
    {     40,    40, "Link Access Protocol SDH (LAPS - X.85 and X.86)" },
    {     41,    41, "FDDI" },
    {     42,    42, "DQDB (ETSI ETS 300 216)" },
    {     43,    43, "FiberChannel-3 (Services)" },
    {     44,    44, "HDLC" },
    {     45,    45, "Ethernet V2/DIX (only)" },
    {     46,    46, "Ethernet 802.3 (only)" },
    {     47,    47, "G.709 ODUj" },
    {     48,    48, "G.709 OTUk(v)" },
    {     49,    49, "CBR/CBRa" },
    {     50,    50, "CBRb" },
    {     51,    51, "BSOT" },
    {     52,    52, "BSNT" },
    {     53,    53, "IP/PPP (GFP)" },
    {     54,    54, "Ethernet MAC (framed GFP)" },
    {     55,    55, "Ethernet PHY (transparent GFP" },
    {     56,    56, "ESCON" },
    {     57,    57, "FICON" },
    {     58,    58, "Fiber Channel" },
    {     59, 31743, "Unassigned" },
    {  31744, 32767, "Experimental Usage/temporarily" },
    {  32768, 65535, "Reserved" },
    {      0,     0, NULL },
};

const value_string gmpls_protection_cap_str[] = {
    {   1, "Extra Traffic"},
    {   2, "Unprotected"},
    {   4, "Shared"},
    {   8, "Dedicated 1:1"},
    {  16, "Dedicated 1+1"},
    {  32, "Enhanced"},
    {  64, "Reserved"},
    { 128, "Reserved"},
    {   0, NULL }
};

static const value_string gmpls_sonet_signal_type_str[] = {
    {  1, "VT1.5 SPE / VC-11"},
    {  2, "VT2 SPE / VC-12"},
    {  3, "VT3 SPE"},
    {  4, "VT6 SPE / VC-2"},
    {  5, "STS-1 SPE / VC-3"},
    {  6, "STS-3c SPE / VC-4"},
    {  7, "STS-1 / STM-0 (transp)"},
    {  8, "STS-3 / STM-1 (transp)"},
    {  9, "STS-12 / STM-4 (transp)"},
    { 10, "STS-48 / STM-16 (transp)"},
    { 11, "STS-192 / STM-64 (transp)"},
    { 12, "STS-768 / STM-256 (transp)"},

    /* Extended non-SONET signal types */
    { 13, "VTG / TUG-2"},
    { 14, "TUG-3"},
    { 15, "STSG-3 / AUG-1"},
    { 16, "STSG-12  / AUG-4"},
    { 17, "STSG-48  / AUG-16"},
    { 18, "STSG-192 / AUG-64"},
    { 19, "STSG-768 / AUG-256"},

    /* Other SONEt signal types */
    { 21, "STS-12c SPE / VC-4-4c"},
    { 22, "STS-48c SPE / VC-4-16c"},
    { 23, "STS-192c SPE / VC-4-64c"},
    {  0, NULL}
};
value_string_ext gmpls_sonet_signal_type_str_ext = VALUE_STRING_EXT_INIT(gmpls_sonet_signal_type_str);

static const value_string ouni_guni_diversity_str[] = {
    { 1, "Node Diverse"},
    { 2, "Link Diverse"},
    { 3, "Shared-Risk Link Group Diverse"},
    { 4, "Shared Path"},
    { 0, NULL}
};

/* FF: RFC 4328 G.709 signal type */
static const range_string gmpls_g709_signal_type_rvals[] = {
    { 0,   0, "Not significant"},
    { 1,   1, "ODU1 (i.e., 2.5 Gbps)"},
    { 2,   2, "ODU2 (i.e., 10  Gbps)"},
    { 3,   3, "ODU3 (i.e., 40  Gbps)"},
    { 4,   5, "Reserved (for future use)"},
    { 6,   6, "OCh at 2.5 Gbps"},
    { 7,   7, "OCh at 10  Gbps"},
    { 8,   8, "OCh at 40  Gbps"},
    { 9, 255, "Reserved (for future use)"},
    { 0,   0, NULL}
};

/* XRO related */

static const value_string rsvp_xro_sobj_lbit_vals[] = {
    { 1, "Should be avoided" },
    { 0, "Must be excluded" },
    { 0, NULL }
};

static const value_string rsvp_xro_sobj_type_vals[] = {
    {  1, "IPv4 prefix" },
    {  2, "IPv6 prefix" },
    {  4, "Unnumbered Interface ID" },
    { 32, "Autonomous system number" },
    { 33, "Explicit Exclusion Route subobject (EXRS)" },
    { 34, "SRLG" },
    {  0, NULL }
};

static const value_string rsvp_xro_sobj_ip_attr_vals[] = {
    {  0, "Interface" },
    {  1, "Node" },
    {  2, "SRLG" },
    {  0, NULL }
};

static const value_string rsvp_juniper_attr_vals[] = {
    {  0x01, "Cos" },
    {  0x02, "Metric 1" },
    {  0x04, "Metric 2" },
    {  0x08, "CCC Status" },
    {  0x10, "Path Type" },
    {  0, NULL }
};

static const value_string rsvp_juniper_path_attr_vals[] = {
    {  0x02, "Primary" },
    {  0x03, "Secondary" },
    {  0, NULL }
};

/* -------------------- Stuff for MPLS/TE objects -------------------- */

static const value_string proto_vals[] = {
    { IP_PROTO_ICMP, "ICMP"},
    { IP_PROTO_IGMP, "IGMP"},
    { IP_PROTO_TCP,  "TCP" },
    { IP_PROTO_UDP,  "UDP" },
    { IP_PROTO_OSPF, "OSPF"},
    { 0,             NULL  }
};

/* Filter keys */
enum hf_rsvp_filter_keys {

    /* Message types */
    RSVPF_MSG,          /* Message type */
    /* Shorthand for message types */
    RSVPF_PATH,
    RSVPF_RESV,
    RSVPF_PATHERR,
    RSVPF_RESVERR,
    RSVPF_PATHTEAR,
    RSVPF_RESVTEAR,
    RSVPF_RCONFIRM,
    RSVPF_JUNK_MSG8,
    RSVPF_JUNK_MSG9,
    RSVPF_RTEARCONFIRM,
    RSVPF_JUNK11,
    RSVPF_BUNDLE,
    RSVPF_ACK,
    RSVPF_JUNK14,
    RSVPF_SREFRESH,
    RSVPF_JUNK16,
    RSVPF_JUNK17,
    RSVPF_JUNK18,
    RSVPF_JUNK19,
    RSVPF_HELLO,
    RSVPF_NOTIFY,
    /* Does the message contain an object of this type? */
    RSVPF_OBJECT,
    /* Object present shorthands */
    RSVPF_SESSION,
    RSVPF_DUMMY_1,
    RSVPF_HOP,
    RSVPF_INTEGRITY,
    RSVPF_TIME_VALUES,
    RSVPF_ERROR,
    RSVPF_SCOPE,
    RSVPF_STYLE,
    RSVPF_FLOWSPEC,
    RSVPF_FILTER_SPEC,
    RSVPF_SENDER,
    RSVPF_TSPEC,
    RSVPF_ADSPEC,
    RSVPF_POLICY,
    RSVPF_CONFIRM,
    RSVPF_LABEL,
    RSVPF_DUMMY_2,
    RSVPF_DUMMY_3,
    RSVPF_LABEL_REQUEST,
    RSVPF_EXPLICIT_ROUTE,
    RSVPF_RECORD_ROUTE,
    RSVPF_HELLO_OBJ,
    RSVPF_MESSAGE_ID,
    RSVPF_MESSAGE_ID_ACK,
    RSVPF_MESSAGE_ID_LIST,
    RSVPF_RECOVERY_LABEL,
    RSVPF_UPSTREAM_LABEL,
    RSVPF_LABEL_SET,
    RSVPF_PROTECTION,
    RSVPF_DIFFSERV,
    RSVPF_DSTE,

    RSVPF_SUGGESTED_LABEL,
    RSVPF_ACCEPTABLE_LABEL_SET,
    RSVPF_RESTART_CAP,

    RSVPF_SESSION_ATTRIBUTE,
    RSVPF_DCLASS,
    RSVPF_LSP_TUNNEL_IF_ID,
    RSVPF_NOTIFY_REQUEST,
    RSVPF_ADMIN_STATUS,
    RSVPF_ADMIN_STATUS_REFLECT,
    RSVPF_ADMIN_STATUS_HANDOVER,
    RSVPF_ADMIN_STATUS_LOCKOUT,
    RSVPF_ADMIN_STATUS_INHIBIT,
    RSVPF_ADMIN_STATUS_CALL_MGMT,
    RSVPF_ADMIN_STATUS_TESTING,
    RSVPF_ADMIN_STATUS_DOWN,
    RSVPF_ADMIN_STATUS_DELETE,
    RSVPF_LSP_ATTRIBUTES,
    RSVPF_ASSOCIATION,
    RSVPF_GENERALIZED_UNI,
    RSVPF_CALL_ID,
    RSVPF_3GPP2_OBJECT,
    RSVPF_UNKNOWN_OBJ,

    /* Session object */
    RSVPF_SESSION_IP,
    RSVPF_SESSION_PROTO,
    RSVPF_SESSION_PORT,
    RSVPF_SESSION_TUNNEL_ID,
    RSVPF_SESSION_EXT_TUNNEL_ID,

    /* Sender template */
    RSVPF_SENDER_IP,
    RSVPF_SENDER_PORT,
    RSVPF_SENDER_LSP_ID,

    /* Diffserv object */
    RSVPF_DIFFSERV_MAPNB,
    RSVPF_DIFFSERV_MAP,
    RSVPF_DIFFSERV_MAP_EXP,
    RSVPF_DIFFSERV_PHBID,
    RSVPF_DIFFSERV_PHBID_DSCP,
    RSVPF_DIFFSERV_PHBID_CODE,
    RSVPF_DIFFSERV_PHBID_BIT14,
    RSVPF_DIFFSERV_PHBID_BIT15,

    /* Diffserv-aware TE object */
    RSVPF_DSTE_CLASSTYPE,

    /* Generalized UNI object */
    RSVPF_GUNI_SRC_IPV4,
    RSVPF_GUNI_DST_IPV4,
    RSVPF_GUNI_SRC_IPV6,
    RSVPF_GUNI_DST_IPV6,

    /* CALL ID object */
    RSVPF_CALL_ID_SRC_ADDR_IPV4,
    RSVPF_CALL_ID_SRC_ADDR_IPV6,

    /* EXCLUDE ROUTE object */
    RSVPF_EXCLUDE_ROUTE,

    /* Vendor Private objects */
    RSVPF_PRIVATE_OBJ,
    RSVPF_ENT_CODE,

    RSVPF_JUNIPER,

    /* Sentinel */
    RSVPF_MAX
};

static const true_false_string tfs_desired_not_desired = { "Desired", "Not Desired" };
static const true_false_string tfs_next_next_hop_next_hop = { "Next-Next-Hop", "Next-Hop" };
static const true_false_string tfs_gen_uni_direction = { "U: 1 - Upstream label/port ID", "U: 0 - Downstream label/port ID" };

static int hf_rsvp_filter[RSVPF_MAX] = { -1 };

/* RSVP Conversation related Hash functions */

/*
 * Compare two RSVP request keys to see if they are equal. Return 1 if they
 * are, 0 otherwise.
 * Two RSVP request keys are equal if and only if they have the exactly the
 * same internal conversation identifier, session type, and matching values in
 * the session info and source info structures.
 */
static gint
rsvp_equal(gconstpointer k1, gconstpointer k2)
{
    const struct rsvp_request_key *key1 = (const struct rsvp_request_key*) k1;
    const struct rsvp_request_key *key2 = (const struct rsvp_request_key*) k2;

    if (key1->conversation != key2->conversation) {
        return 0;
    }

    if (key1->session_type != key2->session_type) {
        return 0;
    }

    switch (key1->session_type) {
    case RSVP_SESSION_TYPE_IPV4:
        if (ADDRESSES_EQUAL(&key1->u.session_ipv4.destination,
                            &key2->u.session_ipv4.destination) == FALSE)
            return 0;

        if (key1->u.session_ipv4.protocol != key2->u.session_ipv4.protocol)
            return 0;

        if (key1->u.session_ipv4.udp_dest_port != key2->u.session_ipv4.udp_dest_port)
            return 0;

        break;

    case RSVP_SESSION_TYPE_IPV6:
        /* this is not supported yet for conversations */
        break;

    case RSVP_SESSION_TYPE_IPV4_LSP:
        if (ADDRESSES_EQUAL(&key1->u.session_ipv4_lsp.destination,
                            &key2->u.session_ipv4_lsp.destination) == FALSE)
            return 0;

        if (key1->u.session_ipv4_lsp.udp_dest_port !=
            key2->u.session_ipv4_lsp.udp_dest_port)
            return 0;


        if (key1->u.session_ipv4_lsp.ext_tunnel_id !=
            key2->u.session_ipv4_lsp.ext_tunnel_id)
            return 0;

        break;

    case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
        if (ADDRESSES_EQUAL(&key1->u.session_agg_ipv4.destination,
                            &key2->u.session_agg_ipv4.destination) == FALSE)
            return 0;

        if (key1->u.session_agg_ipv4.dscp != key2->u.session_agg_ipv4.dscp)
            return 0;

        break;

    case RSVP_SESSION_TYPE_AGGREGATE_IPV6:
        /* this is not supported yet for conversations */
        break;

    case RSVP_SESSION_TYPE_IPV4_UNI:
        if (ADDRESSES_EQUAL(&key1->u.session_ipv4_uni.destination,
                            &key2->u.session_ipv4_uni.destination) == FALSE)
            return 0;

        if (key1->u.session_ipv4_uni.udp_dest_port !=
            key2->u.session_ipv4_uni.udp_dest_port)
            return 0;


        if (key1->u.session_ipv4_uni.ext_tunnel_id !=
            key2->u.session_ipv4_uni.ext_tunnel_id)
            return 0;

        break;

    case RSVP_SESSION_TYPE_IPV4_E_NNI:
        if (ADDRESSES_EQUAL(&key1->u.session_ipv4_enni.destination,
                            &key2->u.session_ipv4_enni.destination) == FALSE)
            return 0;

        if (key1->u.session_ipv4_enni.udp_dest_port !=
            key2->u.session_ipv4_enni.udp_dest_port)
            return 0;


        if (key1->u.session_ipv4_enni.ext_tunnel_id !=
            key2->u.session_ipv4_enni.ext_tunnel_id)
            return 0;

        break;

    default:
        /* This should never happen. */
        break;
    }

    if (ADDRESSES_EQUAL(&key1->source_info.source,
                        &key2->source_info.source) == FALSE)
        return 0;

    if (key1->source_info.udp_source_port != key2->source_info.udp_source_port)
        return 0;

    /* If we get here, the two keys are equal. */
    return 1;
}

/*
 * Calculate a hash key for the supplied RSVP request. The internally allocated
 * conversation-id is unique, so we just use that.
 */
static guint
rsvp_hash(gconstpointer k)
{
    const struct rsvp_request_key *key = (const struct rsvp_request_key*) k;
    return key->conversation;
}

/*
 * Conversation specific initialization code that deletes any unused memory that
 * might need to be freed, and allocates the memory for the various conversation
 * hash tables.
 */
static void
rsvp_init_protocol(void)
{
    if (rsvp_request_hash)
        g_hash_table_destroy(rsvp_request_hash);

    rsvp_request_hash = g_hash_table_new(rsvp_hash, rsvp_equal);
}

static inline int
rsvp_class_to_filter_num(int classnum)
{
    switch(classnum) {
    case RSVP_CLASS_SESSION :
    case RSVP_CLASS_HOP :
    case RSVP_CLASS_INTEGRITY :
    case RSVP_CLASS_TIME_VALUES :
    case RSVP_CLASS_ERROR :
    case RSVP_CLASS_SCOPE :
    case RSVP_CLASS_STYLE :
    case RSVP_CLASS_FLOWSPEC :
    case RSVP_CLASS_FILTER_SPEC :
    case RSVP_CLASS_SENDER_TEMPLATE :
    case RSVP_CLASS_SENDER_TSPEC :
    case RSVP_CLASS_ADSPEC :
    case RSVP_CLASS_POLICY :
    case RSVP_CLASS_CONFIRM :
    case RSVP_CLASS_LABEL :
    case RSVP_CLASS_LABEL_REQUEST :
    case RSVP_CLASS_HELLO :
    case RSVP_CLASS_EXPLICIT_ROUTE :
    case RSVP_CLASS_RECORD_ROUTE :
    case RSVP_CLASS_MESSAGE_ID :
    case RSVP_CLASS_MESSAGE_ID_ACK :
    case RSVP_CLASS_MESSAGE_ID_LIST :
        return classnum + RSVPF_OBJECT;
        break;

    case RSVP_CLASS_RECOVERY_LABEL :
    case RSVP_CLASS_UPSTREAM_LABEL :
    case RSVP_CLASS_LABEL_SET :
    case RSVP_CLASS_PROTECTION :
        return RSVPF_RECOVERY_LABEL + (classnum - RSVP_CLASS_RECOVERY_LABEL);

    case RSVP_CLASS_SUGGESTED_LABEL :
    case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
    case RSVP_CLASS_RESTART_CAP :
        return RSVPF_SUGGESTED_LABEL + (classnum - RSVP_CLASS_SUGGESTED_LABEL);

    case RSVP_CLASS_DIFFSERV :
        return RSVPF_DIFFSERV;

    case RSVP_CLASS_CLASSTYPE :
        return RSVPF_DSTE;

    case RSVP_CLASS_NOTIFY_REQUEST :
        return RSVPF_NOTIFY_REQUEST;
    case RSVP_CLASS_ADMIN_STATUS :
        return RSVPF_ADMIN_STATUS;
    case RSVP_CLASS_LSP_ATTRIBUTES :
        return RSVPF_LSP_ATTRIBUTES;
    case RSVP_CLASS_ASSOCIATION :
        return RSVPF_ASSOCIATION;

    case RSVP_CLASS_SESSION_ATTRIBUTE :
        return RSVPF_SESSION_ATTRIBUTE;
    case RSVP_CLASS_GENERALIZED_UNI :
        return RSVPF_GENERALIZED_UNI;
    case RSVP_CLASS_CALL_ID :
        return RSVPF_CALL_ID;
    case RSVP_CLASS_3GPP2_OBJECT :
        return RSVPF_3GPP2_OBJECT;
    case RSVP_CLASS_DCLASS :
        return RSVPF_DCLASS;
    case RSVP_CLASS_LSP_TUNNEL_IF_ID :
        return RSVPF_LSP_TUNNEL_IF_ID;
    case RSVP_CLASS_EXCLUDE_ROUTE:
        return RSVPF_EXCLUDE_ROUTE;

    case RSVP_CLASS_JUNIPER_PROPERTIES :
        return RSVPF_JUNIPER;
    case RSVP_CLASS_VENDOR_PRIVATE_1:
    case RSVP_CLASS_VENDOR_PRIVATE_2:
    case RSVP_CLASS_VENDOR_PRIVATE_3:
    case RSVP_CLASS_VENDOR_PRIVATE_4:
    case RSVP_CLASS_VENDOR_PRIVATE_5:
    case RSVP_CLASS_VENDOR_PRIVATE_6:
    case RSVP_CLASS_VENDOR_PRIVATE_7:
    case RSVP_CLASS_VENDOR_PRIVATE_8:
    case RSVP_CLASS_VENDOR_PRIVATE_9:
    case RSVP_CLASS_VENDOR_PRIVATE_10:
    case RSVP_CLASS_VENDOR_PRIVATE_11:
    case RSVP_CLASS_VENDOR_PRIVATE_12:
       return RSVPF_PRIVATE_OBJ;

    default:
        return RSVPF_UNKNOWN_OBJ;
    }
}

static inline int
rsvp_class_to_tree_type(int classnum)
{
    switch(classnum) {
    case RSVP_CLASS_SESSION :
        return TT_SESSION;
    case RSVP_CLASS_HOP :
        return TT_HOP;
    case RSVP_CLASS_INTEGRITY :
        return TT_INTEGRITY;
    case RSVP_CLASS_TIME_VALUES :
        return TT_TIME_VALUES;
    case RSVP_CLASS_ERROR :
        return TT_ERROR;
    case RSVP_CLASS_SCOPE :
        return TT_SCOPE;
    case RSVP_CLASS_STYLE :
        return TT_STYLE;
    case RSVP_CLASS_FLOWSPEC :
        return TT_FLOWSPEC;
    case RSVP_CLASS_FILTER_SPEC :
        return TT_FILTER_SPEC;
    case RSVP_CLASS_SENDER_TEMPLATE :
        return TT_SENDER_TEMPLATE;
    case RSVP_CLASS_SENDER_TSPEC :
        return TT_TSPEC;
    case RSVP_CLASS_ADSPEC :
        return TT_ADSPEC;
    case RSVP_CLASS_POLICY :
        return TT_POLICY;
    case RSVP_CLASS_CONFIRM :
        return TT_CONFIRM;
    case RSVP_CLASS_RECOVERY_LABEL :
    case RSVP_CLASS_UPSTREAM_LABEL :
    case RSVP_CLASS_SUGGESTED_LABEL :
    case RSVP_CLASS_LABEL :
        return TT_LABEL;
    case RSVP_CLASS_LABEL_REQUEST :
        return TT_LABEL_REQUEST;
    case RSVP_CLASS_HELLO :
        return TT_HELLO_OBJ;
    case RSVP_CLASS_EXPLICIT_ROUTE :
        return TT_EXPLICIT_ROUTE;
    case RSVP_CLASS_RECORD_ROUTE :
        return TT_RECORD_ROUTE;
    case RSVP_CLASS_MESSAGE_ID :
        return TT_MESSAGE_ID;
    case RSVP_CLASS_MESSAGE_ID_ACK :
        return TT_MESSAGE_ID_ACK;
    case RSVP_CLASS_MESSAGE_ID_LIST :
        return TT_MESSAGE_ID_LIST;
    case RSVP_CLASS_LABEL_SET :
        return TT_LABEL_SET;
    case RSVP_CLASS_PROTECTION :
        return TT_PROTECTION_INFO;
    case RSVP_CLASS_ACCEPTABLE_LABEL_SET :
        return TT_UNKNOWN_CLASS;
    case RSVP_CLASS_RESTART_CAP :
        return TT_RESTART_CAP;
    case RSVP_CLASS_DIFFSERV :
        return TT_DIFFSERV;
    case RSVP_CLASS_CLASSTYPE:
        return TT_CLASSTYPE;
    case RSVP_CLASS_NOTIFY_REQUEST :
        return TT_UNKNOWN_CLASS;
    case RSVP_CLASS_ADMIN_STATUS :
        return TT_ADMIN_STATUS;
    case RSVP_CLASS_LSP_ATTRIBUTES :
    case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES :
        return TT_LSP_ATTRIBUTES;
    case RSVP_CLASS_ASSOCIATION :
        return TT_ASSOCIATION;
    case RSVP_CLASS_JUNIPER_PROPERTIES :
        return TT_JUNIPER;
    case RSVP_CLASS_SESSION_ATTRIBUTE :
        return TT_SESSION_ATTRIBUTE;
    case RSVP_CLASS_GENERALIZED_UNI :
        return TT_GEN_UNI;
    case RSVP_CLASS_CALL_ID :
        return TT_CALL_ID;
    case RSVP_CLASS_3GPP2_OBJECT :
        return TT_3GPP2_OBJECT;
    case RSVP_CLASS_DCLASS :
        return TT_DCLASS;
    case RSVP_CLASS_LSP_TUNNEL_IF_ID :
        return TT_LSP_TUNNEL_IF_ID;
    case RSVP_CLASS_EXCLUDE_ROUTE :
        return TT_EXCLUDE_ROUTE;
    case RSVP_CLASS_VENDOR_PRIVATE_1:
    case RSVP_CLASS_VENDOR_PRIVATE_2:
    case RSVP_CLASS_VENDOR_PRIVATE_3:
    case RSVP_CLASS_VENDOR_PRIVATE_4:
    case RSVP_CLASS_VENDOR_PRIVATE_5:
    case RSVP_CLASS_VENDOR_PRIVATE_6:
    case RSVP_CLASS_VENDOR_PRIVATE_7:
    case RSVP_CLASS_VENDOR_PRIVATE_8:
    case RSVP_CLASS_VENDOR_PRIVATE_9:
    case RSVP_CLASS_VENDOR_PRIVATE_10:
    case RSVP_CLASS_VENDOR_PRIVATE_11:
    case RSVP_CLASS_VENDOR_PRIVATE_12:
        return TT_PRIVATE_CLASS;
    default:
        return TT_UNKNOWN_CLASS;
    }
}

static void
find_rsvp_session_tempfilt(tvbuff_t *tvb, int hdr_offset, int *session_offp, int *tempfilt_offp)
{
    int   s_off = 0, t_off = 0;
    int   len, off;
    guint obj_length;

    if (!tvb_bytes_exist(tvb, hdr_offset+6, 2))
        goto done;

    len = tvb_get_ntohs(tvb, hdr_offset+6) + hdr_offset;
    for (off = hdr_offset + 8; (off < len) && tvb_bytes_exist(tvb, off, 3); off += obj_length) {
        obj_length = tvb_get_ntohs(tvb, off);
        if (obj_length == 0)
            break;
        switch(tvb_get_guint8(tvb, off+2)) {
        case RSVP_CLASS_SESSION:
            s_off = off;
            break;
        case RSVP_CLASS_SENDER_TEMPLATE:
        case RSVP_CLASS_FILTER_SPEC:
            t_off = off;
            break;
        default:
            break;
        }
    }

 done:
    if (session_offp)  *session_offp  = s_off;
    if (tempfilt_offp) *tempfilt_offp = t_off;
}

static char *
summary_session(tvbuff_t *tvb, int offset)
{
    switch(tvb_get_guint8(tvb, offset+3)) {
    case RSVP_SESSION_TYPE_IPV4:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_guint8(tvb, offset+8),
                                  tvb_get_ntohs(tvb, offset+10));
        break;
    case RSVP_SESSION_TYPE_IPV4_LSP:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: IPv4-LSP, Destination %s, Tunnel ID %d, Ext ID %0x. ",
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_ntohs(tvb, offset+10),
                                  tvb_get_ntohl(tvb, offset+12));
        break;
    case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: IPv4-Aggregate, Destination %s, DSCP %d. ",
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_guint8(tvb, offset+11));
        break;
    case RSVP_SESSION_TYPE_IPV4_UNI:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_ntohs(tvb, offset+10),
                                  tvb_ip_to_str(tvb, offset+12));
        break;
    case RSVP_SESSION_TYPE_IPV4_E_NNI:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: IPv4-E-NNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_ntohs(tvb, offset+10),
                                  tvb_ip_to_str(tvb, offset+12));
        break;
    default:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
        break;
    }
    DISSECTOR_ASSERT_NOT_REACHED();
}

static char *
summary_template(tvbuff_t *tvb, int offset)
{
    const char *objtype;

    if (tvb_get_guint8(tvb, offset+2) == RSVP_CLASS_FILTER_SPEC)
        objtype = "FILTERSPEC";
    else
        objtype = "SENDER TEMPLATE";

    switch(tvb_get_guint8(tvb, offset+3)) {
    case 1:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "%s: IPv4, Sender %s, Port %d. ", objtype,
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_ntohs(tvb, offset+10));
        break;
    case 7:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "%s: IPv4-LSP, Tunnel Source: %s, LSP ID: %d. ", objtype,
                                  tvb_ip_to_str(tvb, offset+4),
                                  tvb_get_ntohs(tvb, offset+10));
        break;
    case 9:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "%s: IPv4-Aggregate, Aggregator %s. ", objtype,
                                  tvb_ip_to_str(tvb, offset+4));
        break;
    default:
        return wmem_strdup_printf(wmem_packet_scope(),
                                  "%s: Type %d. ", objtype, tvb_get_guint8(tvb, offset+3));
        break;
    }
    DISSECTOR_ASSERT_NOT_REACHED();
}

/*------------------------------------------------------------------------------
 * SESSION
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_session(proto_item *ti, proto_tree *rsvp_object_tree,
                     tvbuff_t *tvb,
                     int offset, int obj_length,
                     int rsvp_class _U_, int type,
                     rsvp_conversation_info *rsvph)
{
    proto_item *hidden_item;
    int         offset2 = offset + 4;

    proto_item_set_text(ti, "%s", summary_session(tvb, offset));

    switch(type) {
    case RSVP_SESSION_TYPE_IPV4:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_IP],
                            tvb, offset2, 4, ENC_BIG_ENDIAN);

        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_PROTO], tvb,
                            offset2+4, 1, ENC_BIG_ENDIAN);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 1,
                            "Flags: %x",
                            tvb_get_guint8(tvb, offset2+5));
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_PORT], tvb,
                            offset2+6, 2, ENC_BIG_ENDIAN);

        /*
         * Save this information to build the conversation request key
         * later.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_IPV4;
        TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
        rsvph->protocol = tvb_get_guint8(tvb, offset2+4);
        rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);

        break;

    case RSVP_SESSION_TYPE_IPV6:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                            "Destination address: %s",
                            tvb_ip6_to_str(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 1,
                            "Protocol: %u",
                            tvb_get_guint8(tvb, offset2+16));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+17, 1,
                            "Flags: %x",
                            tvb_get_guint8(tvb, offset2+17));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+18, 2,
                            "Destination port: %u",
                            tvb_get_ntohs(tvb, offset2+18));
        /*
         * Save this information to build the conversation request key
         * later. IPv6 conversatiuon support is not implemented yet, so only
         * the session type is stored.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_IPV6;

        break;

    case RSVP_SESSION_TYPE_IPV4_LSP:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 7 - IPv4 LSP");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_IP],
                            tvb, offset2, 4, ENC_BIG_ENDIAN);

        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
                            tvb, offset2+6, 2, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                            "Extended Tunnel ID: %u (%s)",
                            tvb_get_ntohl(tvb, offset2+8),
                            tvb_ip_to_str(tvb, offset2+8));
        hidden_item = proto_tree_add_item(rsvp_object_tree,
                                   hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
                                   tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        PROTO_ITEM_SET_HIDDEN(hidden_item);

        /*
         * Save this information to build the conversation request key
         * later.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_IPV4_LSP;
        TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
        rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
        rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
        break;

    case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 9 - IPv4 Aggregate");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_IP],
                            tvb, offset2, 4, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+7, 1,
                            "DSCP: %u (%s)",
                            tvb_get_guint8(tvb, offset2+7),
                            val_to_str_ext(tvb_get_guint8(tvb, offset2+7),
                                       &dscp_vals_ext, "Unknown (%d)"));
        /*
         * Save this information to build the conversation request key
         * later.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_AGGREGATE_IPV4;
        TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
        rsvph->dscp = tvb_get_guint8(tvb, offset2+7);
        rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
        break;

    case RSVP_SESSION_TYPE_IPV4_UNI:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 11 - IPv4 UNI");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_IP],
                            tvb, offset2, 4, ENC_BIG_ENDIAN);

        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
                            tvb, offset2+6, 2, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                            "Extended IPv4 Address: %s",
                            tvb_ip_to_str(tvb, offset2+8));
        hidden_item = proto_tree_add_item(rsvp_object_tree,
                                   hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
                                   tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        PROTO_ITEM_SET_HIDDEN(hidden_item);

        /*
         * Save this information to build the conversation request key
         * later.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_IPV4_UNI;
        TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
        rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
        rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);

        break;

    case RSVP_SESSION_TYPE_IPV4_E_NNI:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 15 - IPv4 E-NNI");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_IP],
                            tvb, offset2, 4, ENC_BIG_ENDIAN);

        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
                            tvb, offset2+6, 2, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                            "Extended IPv4 Address: %s",
                            tvb_ip_to_str(tvb, offset2+8));
        hidden_item = proto_tree_add_item(rsvp_object_tree,
                                   hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
                                   tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        PROTO_ITEM_SET_HIDDEN(hidden_item);

        /*
         * Save this information to build the conversation request key
         * later.
         */
        rsvph->session_type = RSVP_SESSION_TYPE_IPV4_E_NNI;
        TVB_SET_ADDRESS(&rsvph->destination, AT_IPv4, tvb, offset2, 4);
        rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
        rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);

        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
                            "Data (%d bytes)", obj_length-4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * TLVs for HOP, ERROR and other IF_ID extended objects (RFC4920)
 * (TODO: TLV type 12, 13, 25)
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_ifid_tlv(proto_tree *ti, proto_tree *rsvp_object_tree,
                      tvbuff_t *tvb, int offset, int length,
                      int subtree_type)
{
    int         tlv_off, padding;
    guint16     tlv_type;
    int         tlv_len;
    guint8      isis_len;
    const char *tlv_name;
    proto_tree *rsvp_ifid_subtree=NULL, *ti2;

    for (tlv_off = 0; tlv_off < length; ) {
        tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
        tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);

        if ((tlv_len == 0) || (tlv_off+tlv_len > length)) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
                                "Invalid TLV length");
            return;
        }
        switch(tlv_type) {
        case 1:                         /* IPv4 */
            tlv_name = "";
            goto ifid_ipv4;
        case 14:                        /* PREVIOUS_HOP_IPV4 */
            tlv_name = "Previous-Hop ";
            goto ifid_ipv4;
        case 16:                        /* INCOMING_IPV4 */
            tlv_name = "Incoming ";
        ifid_ipv4:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sIPv4 TLV - %s", tlv_name,
                                      tvb_ip_to_str(tvb, offset+tlv_off+4));

            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sIPv4)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "IPv4 address: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%sIPv4: %s. ", tlv_name,
                                   tvb_ip_to_str(tvb, offset+tlv_off+4));
            break;

        case 2:                         /* IPv6 */
            tlv_name = "";
            goto ifid_ipv6;
        case 15:                        /* PREVIOUS_HOP_IPV6 */
            tlv_name = "Previous-Hop ";
            goto ifid_ipv6;
        case 17:                        /* INCOMING_IPV6 */
            tlv_name = "Incoming ";
        ifid_ipv6:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sIPv6 TLV - %s", tlv_name,
                                      tvb_ip6_to_str(tvb, offset+tlv_off+4));

            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sIPv6)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "IPv6 address: %s",
                                tvb_ip6_to_str(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%sIPv6: %s. ", tlv_name,
                                   tvb_ip6_to_str(tvb, offset+tlv_off+4));
            break;

        case 3:                         /* IF_INDEX */
            tlv_name = "";
            goto ifid_ifindex;
        case 4:                         /* COMPONENT_IF_DOWNSTREAM */
            tlv_name = " Forward";
            goto ifid_ifindex;
        case 5:                         /* COMPONENT_IF_UPSTREAM */
            tlv_name = " Reverse";
            goto ifid_ifindex;
        case 18:                        /* INCOMING_IF_INDEX */
            tlv_name = " Incoming";
        ifid_ifindex:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "Interface-Index%s TLV - %s, %d",
                                      tlv_name,
                                      tvb_ip_to_str(tvb, offset+tlv_off+4),
                                      tvb_get_ntohl(tvb, offset+tlv_off+8));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (Interface Index%s)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "IPv4 address: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+4));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+8, 4,
                                "Interface-ID: %d (0x%0x)",
                                tvb_get_ntohl(tvb, offset+tlv_off+8),
                                tvb_get_ntohl(tvb, offset+tlv_off+8));
            proto_item_append_text(ti, "Data If-Index%s: %s, %d. ", tlv_name,
                                   tvb_ip_to_str(tvb, offset+tlv_off+4),
                                   tvb_get_ntohl(tvb, offset+tlv_off+8));
            break;

        case 6:                         /* DOWNSTREAM_LABEL */
            tlv_name = "Downstream";
            goto ifid_label;
        case 7:                         /* UPSTREAM_LABEL */
            tlv_name = "Upstream";
            goto ifid_label;
        case 19:                        /* INCOMING_DOWN_LABEL */
            tlv_name = "Incoming-Downstream";
            goto ifid_label;
        case 20:                        /* INCOMING_UP_LABEL */
            tlv_name = "Incoming-Upstream";
        ifid_label:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%s-Label TLV - %u", tlv_name,
                                      tvb_get_ntohl(tvb, offset+tlv_off+4));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%s-Label)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "Label: %u",
                                tvb_get_ntohl(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%s-Label: %u. ", tlv_name,
                                   tvb_get_ntohl(tvb, offset+tlv_off+4));
            break;


        case 8:                         /* NODE_ID */
            tlv_name = "";
            goto ifid_nodeid;
        case 21:                        /* REPORTING_NODE_ID */
            tlv_name = "Reporting-";
        ifid_nodeid:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sNode-ID TLV - %s", tlv_name,
                                      tvb_ip_to_str(tvb, offset+tlv_off+4));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sNode-ID)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "Node ID: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%sNode-ID: %s. ", tlv_name,
                                   tvb_ip_to_str(tvb, offset+tlv_off+4));
            break;

        case 9:                         /* OSPF_AREA */
            tlv_name = "";
            goto ifid_ospf;
        case 22:                        /* REPORTING_OSPF_AREA */
            tlv_name = "Reporting-";
        ifid_ospf:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sOSPF-Area TLV - %u", tlv_name,
                                      tvb_get_ntohl(tvb, offset+tlv_off+4));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sOSPF-Area)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "Area: %u",
                                tvb_get_ntohl(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%sOSPF-Area: %u. ", tlv_name,
                                   tvb_get_ntohl(tvb, offset+tlv_off+4));
            break;

        case 10:                        /* ISIS_AREA */
            tlv_name = "";
            goto ifid_isis;
        case 23:                        /* REPORTING_ISIS_AREA */
            tlv_name = "Reporting-";
        ifid_isis:
            isis_len = tvb_get_guint8(tvb, offset+tlv_off+4);
            if ((isis_len < 2) || (isis_len > 11))
            {
              proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
                                  "%sISIS-Area TLV - Invalid Length field", tlv_name);
              break;
            }
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sISIS-Area TLV - %s", tlv_name,
                                      print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len),
                                                     isis_len));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sISIS-Area)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "IS-IS Area Identifier: %s",
                                 print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len), isis_len));
            proto_item_append_text(ti, "%sISIS-Area: %s. ", tlv_name,
                                   print_nsap_net(tvb_get_ptr(tvb, offset+tlv_off+5, isis_len), isis_len));
            break;

        case 11:                        /* AUTONOMOUS_SYSTEM */
            tlv_name = "";
            goto ifid_as;
        case 24:                        /* REPORTING_AUTONOMOUS_SYSTEM */
            tlv_name = "Reporting-";
        ifid_as:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%sAS TLV - %u", tlv_name,
                                      tvb_get_ntohl(tvb, offset+tlv_off+4));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%sAS)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
                                "Autonomous System: %u",
                                tvb_get_ntohl(tvb, offset+tlv_off+4));
            proto_item_append_text(ti, "%sAS: %u. ", tlv_name,
                                   tvb_get_ntohl(tvb, offset+tlv_off+4));
            break;

        case 26:                        /* NODE_EXCLUSIONS */
            tlv_name = "Node";
            goto ifid_ex;
        case 27:                        /* LINK_EXCLUSIONS */
            tlv_name = "Link";
        ifid_ex:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "%s-Exclusions TLV - ", tlv_name);
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
                                "Type: %d (%s-Exclusions)", tlv_type, tlv_name);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset+tlv_off+2));
            dissect_rsvp_ifid_tlv(ti2, rsvp_ifid_subtree, tvb, offset+tlv_off+4,
                                  tlv_len-4, TREE(TT_HOP_SUBOBJ));
            break;
        case 516:
            /* FF: ERROR_STRING TLV, RFC 4783 */
            ti2 =
              proto_tree_add_text(rsvp_object_tree,
                                  tvb, offset + tlv_off,
                                  tlv_len,
                                  "ERROR_STRING TLV - %s",
                                  tvb_format_text(tvb, offset + tlv_off + 4,
                                                  tlv_len - 4));
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
                                "Type: 516 (ERROR_STRING)");
            proto_tree_add_text(rsvp_ifid_subtree,
                                tvb, offset + tlv_off + 2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset + tlv_off + 2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
                                tlv_len - 4,
                                "Error String: %s",
                                tvb_format_text(tvb, offset + tlv_off + 4,
                                                tlv_len - 4));
            break;

        default:
            /* FF: not yet known TLVs are displayed as raw data */
            ti2 = proto_tree_add_text(rsvp_object_tree,
                                      tvb, offset + tlv_off,
                                      tlv_len,
                                      "Unknown TLV (%u)", tlv_type);
            rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off, 2,
                                "Type: %u (Unknown)", tlv_type);
            proto_tree_add_text(rsvp_ifid_subtree,
                                tvb, offset + tlv_off + 2, 2,
                                "Length: %u",
                                tvb_get_ntohs(tvb, offset + tlv_off + 2));
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + 4,
                                tlv_len - 4,
                                "Data: %s",
                                tvb_bytes_to_ep_str_punct(tvb, offset + tlv_off + 4, tlv_len - 4, ' '));
            break;
        }

        padding = (4 - (tlv_len % 4)) % 4;
        if (padding != 0)
            proto_tree_add_text(rsvp_ifid_subtree, tvb, offset + tlv_off + tlv_len, padding, "Padding: %s",
                                tvb_bytes_to_ep_str_punct(tvb, offset + tlv_off + tlv_len, padding, ' '));
        tlv_off += tlv_len + padding;
    }
}

/*------------------------------------------------------------------------------
 * HOP
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_hop(proto_item *ti, proto_tree *rsvp_object_tree,
                 tvbuff_t *tvb,
                 int offset, int obj_length,
                 int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Neighbor address: %s",
                            tvb_ip_to_str(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
                            "Logical interface: %u",
                            tvb_get_ntohl(tvb, offset2+4));
        proto_item_set_text(ti, "HOP: IPv4, %s",
                            tvb_ip_to_str(tvb, offset2));
        break;

    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                            "Neighbor address: %s",
                            tvb_ip6_to_str(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 4,
                            "Logical interface: 0x%08x",
                            tvb_get_ntohl(tvb, offset2+16));
        break;

    case 3:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 3 - IPv4 IF-ID");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Neighbor address: %s",
                            tvb_ip_to_str(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
                            "Logical interface: %u",
                            tvb_get_ntohl(tvb, offset2+4));

        proto_item_set_text(ti, "HOP: IPv4 IF-ID. Control IPv4: %s. ",
                            tvb_ip_to_str(tvb, offset2));

        dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length-12,
                              TREE(TT_HOP_SUBOBJ));

        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * TIME VALUES
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_time_values(proto_item *ti, proto_tree *rsvp_object_tree,
                         tvbuff_t *tvb,
                         int offset, int obj_length,
                         int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Refresh interval: %u ms (%u seconds)",
                            tvb_get_ntohl(tvb, offset2),
                            tvb_get_ntohl(tvb, offset2)/1000);
        proto_item_set_text(ti, "TIME VALUES: %d ms",
                            tvb_get_ntohl(tvb, offset2));
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * Error value field in ERROR object
 *------------------------------------------------------------------------------*/
static guint16
dissect_rsvp_error_value(proto_tree *ti, tvbuff_t *tvb,
                         int offset, guint8 error_code)
{
    guint16           error_val;
    guint8            error_class, error_ctype;
    value_string_ext *rsvp_error_vals_ext_p = NULL;

    error_val = tvb_get_ntohs(tvb, offset);
    switch (error_code) {
    case RSVP_ERROR_ADMISSION:
        rsvp_error_vals_ext_p = &rsvp_admission_control_error_vals_ext;
        break;
    case RSVP_ERROR_POLICY:
        rsvp_error_vals_ext_p = &rsvp_policy_control_error_vals_ext;
        break;
    case RSVP_ERROR_TRAFFIC:
        rsvp_error_vals_ext_p = &rsvp_traffic_control_error_vals_ext;
        break;
    case RSVP_ERROR_ROUTING:
        rsvp_error_vals_ext_p = &rsvp_routing_error_vals_ext;
        break;
    case RSVP_ERROR_NOTIFY:
        rsvp_error_vals_ext_p = &rsvp_notify_error_vals_ext;
        break;
    case RSVP_ERROR_DIFFSERV:
        rsvp_error_vals_ext_p = &rsvp_diffserv_error_vals_ext;
        break;
    case RSVP_ERROR_DSTE:
        rsvp_error_vals_ext_p = &rsvp_diffserv_aware_te_error_vals_ext;
        break;
    case RSVP_ERROR_CALL_MGMT:
        rsvp_error_vals_ext_p = &rsvp_call_mgmt_error_vals_ext;
        break;
    }

    switch (error_code) {
    case RSVP_ERROR_ADMISSION:
    case RSVP_ERROR_TRAFFIC:
        if ((error_val & 0xc0) == 0) {
            DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
            proto_tree_add_text(ti, tvb, offset, 2,
                "Error value: %u - %s", error_val,
                                val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"));
        }
        else if ((error_val & 0xc0) == 0x80) {
            proto_tree_add_text(ti, tvb, offset, 2,
                "Error value: %u - Organization specific subcode (%u)", error_val,
                error_val);
        }
        else if ((error_val & 0xc0) == 0xc0) {
            proto_tree_add_text(ti, tvb, offset, 2,
                "Error value: %u - Service specific subcode (%u)", error_val,
                error_val);
        }
        break;
    case RSVP_ERROR_UNKNOWN_CLASS:
    case RSVP_ERROR_UNKNOWN_C_TYPE:
        error_class = error_val / 256;
        error_ctype = error_val % 256;
        proto_tree_add_text(ti, tvb, offset, 2, "Class: %u (%s) - CType: %u",
                            error_class, val_to_str_ext_const(error_class, &rsvp_class_vals_ext, "Unknown"),
                            error_ctype);
        break;
    case RSVP_ERROR_POLICY:
    case RSVP_ERROR_NOTIFY:
    case RSVP_ERROR_ROUTING:
    case RSVP_ERROR_DIFFSERV:
    case RSVP_ERROR_DSTE:
    case RSVP_ERROR_CALL_MGMT:
        DISSECTOR_ASSERT(rsvp_error_vals_ext_p != NULL);
        proto_tree_add_text(ti, tvb, offset, 2, "Error value: %u - %s", error_val,
                            val_to_str_ext(error_val, rsvp_error_vals_ext_p, "Unknown (%d)"));
        break;
    default:
        proto_tree_add_text(ti, tvb, offset, 2, "Error value: %u", error_val);
        break;
    }
    return error_val;
}

/*------------------------------------------------------------------------------
 * ERROR
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_error(proto_item *ti, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length,
                   int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    int         offset3;
    guint8      error_flags;
    guint8      error_code;
    guint16     error_val;
    proto_tree *ti2, *rsvp_error_subtree;

    switch(type) {
    case 1: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        if(obj_length>4) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                                "Error node: %s",
                            tvb_ip_to_str(tvb, offset2));

        offset3 = offset2+4;
        }
        break;
    }

    case 2: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        if(obj_length>4) {
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                            "Error node: %s",
                            tvb_ip6_to_str(tvb, offset2));

        offset3 = offset2+16;
        }
        break;
    }

    case 3: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 3 - IPv4 IF-ID");
        if(obj_length>4) {
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Error node: %s",
                            tvb_ip_to_str(tvb, offset2));

        offset3 = offset2+4;
        }
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        if(obj_length>4) {
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        }
        return;
    }

    if(obj_length>4) {
        error_flags = tvb_get_guint8(tvb, offset3);
        ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_error_flags,
                                 tvb, offset3, 1, ENC_BIG_ENDIAN);
        rsvp_error_subtree = proto_item_add_subtree(ti2, TREE(TT_ERROR_FLAGS));
        proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_path_state_removed,
                                 tvb, offset3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_not_guilty,
                                 tvb, offset3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_error_subtree, hf_rsvp_error_flags_in_place,
                                 tvb, offset3, 1, ENC_BIG_ENDIAN);
        proto_item_append_text(ti2, " %s %s %s",
                               (error_flags & (1<<2))  ? "Path-State-Removed" : "",
                               (error_flags & (1<<1))  ? "NotGuilty" : "",
                               (error_flags & (1<<0))  ? "InPlace" : "");
        error_code = tvb_get_guint8(tvb, offset3+1);
        proto_tree_add_text(rsvp_object_tree, tvb, offset3+1, 1,
                            "Error code: %u - %s", error_code,
                            val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"));
        error_val = dissect_rsvp_error_value(rsvp_object_tree, tvb, offset3+2, error_code);



        switch (type) {
        case 1:
            proto_item_set_text(ti, "ERROR: IPv4, Error code: %s, Value: %d, Error Node: %s",
                                val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
                                error_val, tvb_ip_to_str(tvb, offset2));
            break;
        case 3:
            proto_item_set_text(ti, "ERROR: IPv4 IF-ID, Error code: %s, Value: %d, Control Node: %s. ",
                                val_to_str_ext(error_code, &rsvp_error_codes_ext, "Unknown (%d)"),
                                error_val, tvb_ip_to_str(tvb, offset2));
            dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length-12,
                                  TREE(TT_ERROR_SUBOBJ));
            break;
        }
    }
}

/*------------------------------------------------------------------------------
 * SCOPE
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_scope(proto_item *ti _U_, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length,
                   int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;
    int mylen;

    mylen = obj_length - 4;
    switch(type) {
    case 1: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        while (mylen > 0) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                                "IPv4 Address: %s",
                                tvb_ip_to_str(tvb, offset2));
            offset2 += 4;
            mylen -= 4;
        }
        break;
    }

    case 2: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        while (mylen > 0) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                                "IPv6 Address: %s",
                                tvb_ip6_to_str(tvb, offset2));
            offset2 += 16;
            mylen -= 16;
        }
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
                            "Data (%d bytes)", mylen);
        break;
    }
}

/*------------------------------------------------------------------------------
 * STYLE
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_style(proto_item *ti, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length,
                   int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1: {
        guint32 style;

        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Flags: 0x%02x",
                            tvb_get_guint8(tvb, offset2));
        style = tvb_get_ntoh24(tvb, offset2+1);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+1,
                            3, "Style: 0x%06X - %s", style,
                            val_to_str_const(style, style_vals, "Unknown"));
        proto_item_set_text(ti, "STYLE: %s (%d)",
                            val_to_str_const(style, style_vals, "Unknown"),
                            style);
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * CONFIRM
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_confirm(proto_item *ti, proto_tree *rsvp_object_tree,
                     tvbuff_t *tvb,
                     int offset, int obj_length,
                     int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Receiver address: %s",
                            tvb_ip_to_str(tvb, offset2));
        proto_item_set_text(ti, "CONFIRM: Receiver %s",
                            tvb_ip_to_str(tvb, offset2));
        break;
    }

    case 2: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                            "Receiver address: %s",
                            tvb_ip6_to_str(tvb, offset2));
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * SENDER TEMPLATE and FILTERSPEC
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_template_filter(proto_item *ti, proto_tree *rsvp_object_tree,
                             tvbuff_t *tvb,
                             int offset, int obj_length,
                             int rsvp_class _U_, int type,
                             rsvp_conversation_info *rsvph)
{
    int offset2 = offset + 4;

    proto_item_set_text(ti, "%s", summary_template(tvb, offset));
    switch(type) {
    case 1:
         proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                             "C-type: 1 - IPv4");
         proto_tree_add_item(rsvp_object_tree,
                             hf_rsvp_filter[RSVPF_SENDER_IP],
                             tvb, offset2, 4, ENC_BIG_ENDIAN);
         proto_tree_add_item(rsvp_object_tree,
                             hf_rsvp_filter[RSVPF_SENDER_PORT],
                             tvb, offset2+6, 2, ENC_BIG_ENDIAN);

         /*
          * Save this information to build the conversation request key later.
          */
         TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
         rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
         break;

     case 2:
         proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                             "C-type: 2 - IPv6");
         proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                             "Source address: %s",
                             tvb_ip6_to_str(tvb, offset2));
         proto_tree_add_text(rsvp_object_tree, tvb, offset2+18, 2,
                             "Source port: %u",
                             tvb_get_ntohs(tvb, offset2+18));
         break;

     case 7:
         proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                             "C-type: 7 - IPv4 LSP");
         proto_tree_add_item(rsvp_object_tree,
                             hf_rsvp_filter[RSVPF_SENDER_IP],
                             tvb, offset2, 4, ENC_BIG_ENDIAN);
         proto_tree_add_item(rsvp_object_tree,
                             hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
                             tvb, offset2+6, 2, ENC_BIG_ENDIAN);

         /*
          * Save this information to build the conversation request key later.
          */
         TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
         rsvph->udp_source_port = tvb_get_ntohs(tvb, offset2+6);
         break;

    case 9:
         proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                             "C-type: 9 - IPv4 Aggregate");
         proto_tree_add_item(rsvp_object_tree,
                             hf_rsvp_filter[RSVPF_SENDER_IP],
                             tvb, offset2, 4, ENC_BIG_ENDIAN);

         /*
          * Save this information to build the conversation request key later.
          */
         TVB_SET_ADDRESS(&rsvph->source, AT_IPv4, tvb, offset2, 4);
         break;

     default:
         proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                             "C-type: Unknown (%u)",
                             type);
         proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                             "Data (%d bytes)", obj_length - 4);
         break;
 }
}

/*------------------------------------------------------------------------------
 * TLVs for Ethernet SENDER TSPEC and FLOWSPEC (RFC6003)
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_eth_tspec_tlv(proto_item *ti, proto_tree *rsvp_object_tree,
                           tvbuff_t *tvb, int offset, int tlv_length,
                           int subtree_type)
{
    int         tlv_off;
    guint16     tlv_type;
    int         tlv_len;
    guint8      profile;
    proto_tree *rsvp_ethspec_subtree, *ethspec_profile_subtree, *ti2, *ti3;

    for (tlv_off = 0; tlv_off < tlv_length; ) {
        tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
        tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);

        if ((tlv_len == 0) || (tlv_off+tlv_len > tlv_length)) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
                                "Invalid length");
            return;
        }
        switch(tlv_type) {
        case 0:
        case 1:
        case 255:
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "RESERVED (RFC6003)");
            rsvp_ethspec_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off, 2,
                                "Type: %u (RESERVED)", tlv_type);
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            break;

        case 2:
        case 129:     /* OIF demo 2009 */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+tlv_off, tlv_len,
                                      "Ethernet Bandwidth Profile TLV: CIR=%.10g, CBS=%.10g, "
                                      "EIR=%.10g, EBS=%.10g",
                                      tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
                                      tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
                                      tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
                                      tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
            rsvp_ethspec_subtree = proto_item_add_subtree(ti2, subtree_type);
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off, 2,
                                "Type: %u - Ethernet Bandwidth Profile", tlv_type);
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            profile = tvb_get_guint8(tvb, offset+tlv_off+4);
            ti3 = proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+4, 1,
                                      "Profile: 0x%02x", profile);
            ethspec_profile_subtree = proto_item_add_subtree(ti3, TREE(TT_ETHSPEC_SUBTREE));
            proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_color_mode,
                             tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
            proto_tree_add_item(ethspec_profile_subtree, hf_rsvp_eth_tspec_tlv_coupling_flag,
                             tvb, offset+tlv_off+4, 1, ENC_BIG_ENDIAN);
            proto_item_append_text(ti3, " %s %s",
                                   (profile & (1<<1))  ? "CM" : "",
                                   (profile & (1<<0))  ? "CF" : "");
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+5, 1,
                                "Index: %x", tvb_get_guint8(tvb, offset+tlv_off+5));
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+6, 2,
                                "Reserved: %x", tvb_get_ntohs(tvb, offset+tlv_off+6));
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+8, 4, "CIR: %.10g",
                                tvb_get_ntohieee_float(tvb, offset+tlv_off+8));
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+12, 4, "CBS: %.10g",
                                tvb_get_ntohieee_float(tvb, offset+tlv_off+12));
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+16, 4, "EIR: %.10g",
                                tvb_get_ntohieee_float(tvb, offset+tlv_off+16));
            proto_tree_add_text(rsvp_ethspec_subtree, tvb, offset+tlv_off+20, 4, "EBS: %.10g",
                                tvb_get_ntohieee_float(tvb, offset+tlv_off+20));

            proto_item_append_text(ti, "ETH profile: CIR=%.10g, CBS=%.10g, EIR=%.10g, "
                                       "EBS=%.10g",
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+8),
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+12),
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+16),
                                   tvb_get_ntohieee_float(tvb, offset+tlv_off+20));
            break;

        default:
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
                                "Unknown TLV: %u", tlv_type);
            break;
        }
        tlv_off += tlv_len;
    }
}

/*------------------------------------------------------------------------------
 * SENDER TSPEC
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_tspec(proto_item *ti, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length,
                   int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    int         mylen;
    proto_tree *tspec_tree, *ti2;
    guint8      signal_type;
    guint16     switch_gran;

    mylen = obj_length - 4;

    switch(type) {
    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - Integrated Services");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Message format version: %u",
                            tvb_get_guint8(tvb, offset2)>>4);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "Data length: %u words, not including header",
                            tvb_get_ntohs(tvb, offset2+2));

        mylen -= 4;
        offset2 += 4;

        proto_item_set_text(ti, "SENDER TSPEC: IntServ, ");

        while (mylen > 0) {
            guint8 service_num;
            guint8 param_id;
            guint param_len;
            guint param_len_processed;
            guint length;

            service_num = tvb_get_guint8(tvb, offset2);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                                "Service header: %u - %s",
                                service_num,
                                val_to_str_const(service_num, qos_vals, "Unknown"));
            length = tvb_get_ntohs(tvb, offset2+2);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                                "Length of service %u data: %u words, "
                                "not including header",
                                service_num, length);

            mylen -= 4;
            offset2 += 4;

            /* Process all known service headers as a set of parameters */
            param_len_processed = 0;
            while (param_len_processed < length) {
                param_id = tvb_get_guint8(tvb, offset2);
                param_len = tvb_get_ntohs(tvb, offset2+2) + 1;
                if (param_len < 1)
                    THROW(ReportedBoundsError);
                switch(param_id) {
                case 127:
                    /* Token Bucket */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Token Bucket TSpec: ");
                    tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));

                    proto_tree_add_text(tspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: 0x%02x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));
                    proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
                                        "Token bucket rate: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_tree_add_text(tspec_tree, tvb, offset2+8, 4,
                                        "Token bucket size: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+8));
                    proto_tree_add_text(tspec_tree, tvb, offset2+12, 4,
                                        "Peak data rate: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+12));
                    proto_tree_add_text(tspec_tree, tvb, offset2+16, 4,
                                        "Minimum policed unit [m]: %u",
                                        tvb_get_ntohl(tvb, offset2+16));
                    proto_tree_add_text(tspec_tree, tvb, offset2+20, 4,
                                        "Maximum packet size [M]: %u",
                                        tvb_get_ntohl(tvb, offset2+20));
                    proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
                                           tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
                                           tvb_get_ntohieee_float(tvb, offset2+4),
                                           tvb_get_ntohieee_float(tvb, offset2+8),
                                           tvb_get_ntohieee_float(tvb, offset2+12),
                                           tvb_get_ntohl(tvb, offset2+16),
                                           tvb_get_ntohl(tvb, offset2+20));
                    break;

                case 128:
                    /* Null Service (RFC2997) */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Null Service TSpec: ");
                    tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));

                    proto_tree_add_text(tspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: %x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));
                    proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
                                        "Maximum packet size [M]: %u",
                                        tvb_get_ntohl(tvb, offset2+4));
                    proto_item_append_text(ti, "Null Service. M=%u",
                                           tvb_get_ntohl(tvb, offset2+4));
                    proto_item_append_text(ti2, "Max pkt size=%u",
                                           tvb_get_ntohl(tvb, offset2+4));
                    break;

                case 126:
                    /* Compression hint (RFC3006) */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Compression Hint: ");
                    tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));

                    proto_tree_add_text(tspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(tspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: %x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(tspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));
                    proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
                                        "Hint: %u",
                                        tvb_get_ntohl(tvb, offset2+4));
                    proto_tree_add_text(tspec_tree, tvb, offset2+4, 4,
                                        "Compression Factor: %u",
                                        tvb_get_ntohl(tvb, offset2+8));
                    proto_item_append_text(ti, "Compression Hint. Hint=%u, Factor=%u",
                                           tvb_get_ntohl(tvb, offset2+4),
                                           tvb_get_ntohl(tvb, offset2+8));
                    proto_item_append_text(ti2, "Hint=%u, Factor=%u",
                                           tvb_get_ntohl(tvb, offset2+4),
                                           tvb_get_ntohl(tvb, offset2+8));
                    break;

                default:
                    proto_tree_add_text(rsvp_object_tree, tvb, offset2, param_len*4,
                                        "Unknown parameter %d, %d words",
                                        param_id, param_len);
                    break;
                }
                param_len_processed += param_len;
                offset2 += param_len*4;
            }
            mylen -= length*4;
        }
        break;

    case 4: /* SONET/SDH Tspec */
        proto_item_set_text(ti, "SENDER TSPEC: SONET/SDH, ");

        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 4 - SONET/SDH");
        signal_type = tvb_get_guint8(tvb, offset2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Signal Type: %d - %s", signal_type,
                            val_to_str_ext_const(signal_type,
                                                 &gmpls_sonet_signal_type_str_ext, "Unknown"));
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
                            "Requested Concatenation (RCC): %d", tvb_get_guint8(tvb, offset2+1));
        tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_standard_contiguous_concatenation,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "Number of Contiguous Components (NCC): %d", tvb_get_ntohs(tvb, offset2+2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
                            "Number of Virtual Components (NVC): %d", tvb_get_ntohs(tvb, offset2+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
                            "Multiplier (MT): %d", tvb_get_ntohs(tvb, offset2+6));
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                                  "Transparency (T): 0x%0x", tvb_get_ntohl(tvb, offset2+8));
        tspec_tree = proto_item_add_subtree(ti2, TREE(TT_TSPEC_SUBTREE));

        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_regenerator_section,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_multiplex_section,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_J0_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_K1_K2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_F1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_E2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_B2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M0_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(tspec_tree, hf_rsvp_sender_tspec_M1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+12, 4,
                            "Profile (P): %d", tvb_get_ntohl(tvb, offset2+12));

        proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
                               val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
                               tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
                               tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
                               tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
        break;

    case 5: /* FF: G.709 TSPEC, RFC 4328 */
        proto_item_set_text(ti, "SENDER TSPEC: G.709, ");

        proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                            "C-type: 5 - G.709");
        signal_type = tvb_get_guint8(tvb, offset2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Signal Type: %d - %s", signal_type,
                            rval_to_str(signal_type,
                                        gmpls_g709_signal_type_rvals,
                                        "Unknown"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
                            "Number of Multiplexed Components (NMC): %d",
                            tvb_get_ntohs(tvb, offset2 + 2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
                            "Number of Virtual Components (NVC): %d",
                            tvb_get_ntohs(tvb, offset2 + 4));

        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
                            "Multiplier (MT): %d",
                            tvb_get_ntohs(tvb, offset2 + 6));
        proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
                               rval_to_str(signal_type,
                                           gmpls_g709_signal_type_rvals,
                                           "Unknown"),
                               tvb_get_ntohs(tvb, offset2 + 2),
                               tvb_get_ntohs(tvb, offset2 + 4),
                               tvb_get_ntohs(tvb, offset2 + 6));
        break;

    case 6:   /* Ethernet TSPEC (RFC6003)  */
        proto_item_set_text(ti, "SENDER TSPEC: Ethernet, ");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 6 - Ethernet");
        switch_gran = tvb_get_ntohs(tvb, offset2);
        if (switch_gran == 0)
          proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                              "Switching granularity: 0 - Provided in signaling");
        else if (switch_gran == 1)
          proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                              "Switching granularity: 1 - Ethernet port");
        else if (switch_gran == 2)
          proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                              "Switching granularity: 2 - Ethernet frame");
        else
          proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                              "Switching granularity: %u - ???", switch_gran);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "MTU: %u", tvb_get_ntohs(tvb, offset2+2));

        dissect_rsvp_eth_tspec_tlv(ti, rsvp_object_tree, tvb, offset+8, obj_length-8,
                                   TREE(TT_TSPEC_SUBTREE));
        break;

    default: /* Unknown TSpec */
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;

    }
}

/*------------------------------------------------------------------------------
 * FLOWSPEC
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_flowspec(proto_item *ti, proto_tree *rsvp_object_tree,
                      tvbuff_t *tvb,
                      int offset, int obj_length,
                      int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    int         mylen, signal_type;
    proto_tree *flowspec_tree, *ti2;
    proto_item *item;
    guint16     switch_gran;

    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                        "C-type: %u", type);
    mylen = obj_length - 4;

    switch(type) {

    case 2:
        if (mylen < 4) {
            item = proto_tree_add_text(rsvp_object_tree, tvb, 0, 0,
                                       "Object length %u < 8", obj_length);
            PROTO_ITEM_SET_GENERATED(item);
            return;
        }
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Message format version: %u",
                            tvb_get_guint8(tvb, offset2)>>4);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "Data length: %u words, not including header",
                            tvb_get_ntohs(tvb, offset2+2));

        proto_item_set_text(ti, "FLOWSPEC: ");

        mylen -= 4;
        offset2+= 4;
        while (mylen > 0) {
            guint8 service_num;
            guint length;
            guint8 param_id;
            guint param_len;
            guint param_len_processed;

            if (mylen < 4) {
                item = proto_tree_add_text(rsvp_object_tree, tvb, 0, 0,
                                           "Object length %u not large enough",
                                           obj_length);
                PROTO_ITEM_SET_GENERATED(item);
                return;
            }
            service_num = tvb_get_guint8(tvb, offset2);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                                "Service header: %u - %s",
                                service_num,
                                val_to_str_ext_const(service_num, &intsrv_services_str_ext, "Unknown"));
            length = tvb_get_ntohs(tvb, offset2+2);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                                "Length of service %u data: %u words, "
                                "not including header",
                                service_num,
                                length);

            mylen   -= 4;
            offset2 += 4;

            proto_item_append_text(ti, "%s: ",
                                   val_to_str_ext(service_num, &intsrv_services_str_ext,
                                                  "Unknown (%d)"));

            /* Process all known service headers as a set of parameters */
            param_len_processed = 0;
            while (param_len_processed < length) {
                param_id = tvb_get_guint8(tvb, offset2);
                param_len = tvb_get_ntohs(tvb, offset2+2) + 1;
                if (param_len < 1)
                    THROW(ReportedBoundsError);
                switch(param_id) {
                case 127:
                    /* Token Bucket */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Token Bucket: ");
                    flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));

                    proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: 0x%02x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
                                        "Token bucket rate: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+8, 4,
                                        "Token bucket size: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+8));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+12, 4,
                                        "Peak data rate: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+12));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+16, 4,
                                        "Minimum policed unit [m]: %u",
                                        tvb_get_ntohl(tvb, offset2+16));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+20, 4,
                                        "Maximum packet size [M]: %u",
                                        tvb_get_ntohl(tvb, offset2+20));
                    proto_item_append_text(ti, "Token Bucket, %.10g bytes/sec. ",
                                           tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_item_append_text(ti2, "Rate=%.10g Burst=%.10g Peak=%.10g m=%u M=%u",
                                           tvb_get_ntohieee_float(tvb, offset2+4),
                                           tvb_get_ntohieee_float(tvb, offset2+8),
                                           tvb_get_ntohieee_float(tvb, offset2+12),
                                           tvb_get_ntohl(tvb, offset2+16),
                                           tvb_get_ntohl(tvb, offset2+20));
                    break;

                case 130:
                    /* Guaranteed-rate RSpec */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Guaranteed-Rate RSpec: ");
                    flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
                    proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: %x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));

                    proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
                                        "Rate: %.10g",
                                        tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+8, 4,
                                        "Slack term: %u",
                                        tvb_get_ntohl(tvb, offset2+8));
                    proto_item_append_text(ti, "RSpec, %.10g bytes/sec. ",
                                           tvb_get_ntohieee_float(tvb, offset2+4));
                    proto_item_append_text(ti2, "R=%.10g, s=%u",
                                           tvb_get_ntohieee_float(tvb, offset2+4),
                                           tvb_get_ntohl(tvb, offset2+8));
                    break;

                case 128:
                    /* Null Service (RFC2997) */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2, param_len*4,
                                              "Null Service Flowspec: ");
                    flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));

                    proto_tree_add_text(flowspec_tree, tvb, offset2, 1,
                                        "Parameter %u - %s",
                                        param_id,
                                        val_to_str_ext_const(param_id, &svc_vals_ext, "Unknown"));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+1, 1,
                                        "Parameter %u flags: %x",
                                        param_id,
                                        tvb_get_guint8(tvb, offset2+1));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+2, 2,
                                        "Parameter %u data length: %u words, "
                                        "not including header",
                                        param_id,
                                        tvb_get_ntohs(tvb, offset2+2));
                    proto_tree_add_text(flowspec_tree, tvb, offset2+4, 4,
                                        "Maximum packet size [M]: %u",
                                        tvb_get_ntohl(tvb, offset2+4));
                    proto_item_append_text(ti, "Null Service. M=%u",
                                           tvb_get_ntohl(tvb, offset2+4));
                    proto_item_append_text(ti2, "Max pkt size=%u",
                                           tvb_get_ntohl(tvb, offset2+4));
                    break;

                default:
                    proto_tree_add_text(rsvp_object_tree, tvb, offset2, param_len*4,
                                        "Unknown parameter %d, %d words",
                                        param_id, param_len);
                    break;
                }
                param_len_processed += param_len;
                offset2 += param_len * 4;
            }

            /* offset2 += length*4; */
            mylen -= length*4;
        }
        break;

    case 4:
        proto_item_set_text(ti, "FLOWSPEC: SONET/SDH, ");

        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 4 - SONET/SDH");
        signal_type = tvb_get_guint8(tvb, offset2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Signal Type: %d - %s", signal_type,
                            val_to_str_ext_const(signal_type,
                                                 &gmpls_sonet_signal_type_str_ext, "Unknown"));
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
                                  "Requested Concatenation (RCC): %d", tvb_get_guint8(tvb, offset2+1));
        flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_standard_contiguous_concatenation,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "Number of Contiguous Components (NCC): %d", tvb_get_ntohs(tvb, offset2+2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
                            "Number of Virtual Components (NVC): %d", tvb_get_ntohs(tvb, offset2+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
                            "Multiplier (MT): %d", tvb_get_ntohs(tvb, offset2+6));
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                                  "Transparency (T): 0x%0x", tvb_get_ntohl(tvb, offset2+8));
        flowspec_tree = proto_item_add_subtree(ti2, TREE(TT_FLOWSPEC_SUBTREE));

        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_regenerator_section,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_multiplex_section,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_J0_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_K1_K2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_F1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_E2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_B2_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M0_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);
        proto_tree_add_item(flowspec_tree, hf_rsvp_flowspec_M1_transparency,
                             tvb, offset2+8, 4, ENC_BIG_ENDIAN);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+12, 4,
                            "Profile (P): %d", tvb_get_ntohl(tvb, offset2+12));

        proto_item_append_text(ti, "Signal [%s], RCC %d, NCC %d, NVC %d, MT %d, Transparency %d, Profile %d",
                               val_to_str_ext_const(signal_type, &gmpls_sonet_signal_type_str_ext, "Unknown"),
                               tvb_get_guint8(tvb, offset2+1), tvb_get_ntohs(tvb, offset2+2),
                               tvb_get_ntohs(tvb, offset2+4), tvb_get_ntohs(tvb, offset2+6),
                               tvb_get_ntohl(tvb, offset2+8), tvb_get_ntohl(tvb, offset2+12));
        break;

    case 5: /* FF: G.709 FLOWSPEC, RFC 4328 */
        proto_item_set_text(ti, "FLOWSPEC: G.709, ");

        proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                            "C-type: 5 - G.709");
        signal_type = tvb_get_guint8(tvb, offset2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Signal Type: %d - %s", signal_type,
                            rval_to_str(signal_type,
                                        gmpls_g709_signal_type_rvals,
                                        "Unknown"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 2, 2,
                            "Number of Multiplexed Components (NMC): %d",
                            tvb_get_ntohs(tvb, offset2 + 2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 2,
                            "Number of Virtual Components (NVC): %d",
                            tvb_get_ntohs(tvb, offset2 + 4));

        proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 6, 2,
                            "Multiplier (MT): %d",
                            tvb_get_ntohs(tvb, offset2 + 6));
        proto_item_append_text(ti, "Signal [%s], NMC %d, NVC %d, MT %d",
                               rval_to_str(signal_type,
                                           gmpls_g709_signal_type_rvals,
                                           "Unknown"),
                               tvb_get_ntohs(tvb, offset2 + 2),
                               tvb_get_ntohs(tvb, offset2 + 4),
                               tvb_get_ntohs(tvb, offset2 + 6));
        break;

    case 6:   /* Ethernet FLOWSPEC (RFC6003)  */
        proto_item_set_text(ti, "FLOWSPEC: Ethernet, ");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 6 - Ethernet");
        switch_gran = tvb_get_ntohs(tvb, offset2);
        if (switch_gran == 0)
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                                "Switching granularity: 0 - Provided in signaling");
        else if (switch_gran == 1)
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                                "Switching granularity: 1 - Ethernet port");
        else if (switch_gran == 2)
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                                "Switching granularity: 2 - Ethernet frame");
        else
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 2,
                                "Switching granularity: %u - ???", switch_gran);

        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "MTU: %u", tvb_get_ntohs(tvb, offset2+2));

        dissect_rsvp_eth_tspec_tlv(ti, rsvp_object_tree, tvb, offset+8, obj_length-8,
                                   TREE(TT_FLOWSPEC_SUBTREE));
        break;

    default:
        break;
    }
}

/*------------------------------------------------------------------------------
 * ADSPEC
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_adspec(proto_item *ti, proto_tree *rsvp_object_tree,
                    tvbuff_t *tvb,
                    int offset, int obj_length,
                    int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    int         mylen, i;
    proto_tree *adspec_tree;

    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                        "C-type: %u", type);
    mylen = obj_length - 4;

    proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                        "Message format version: %u",
                        tvb_get_guint8(tvb, offset2)>>4);
    proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                        "Data length: %u words, not including header",
                        tvb_get_ntohs(tvb, offset2+2));
    mylen -= 4;
    offset2 += 4;
    while (mylen > 0) {
        guint8 service_num;
        guint8 break_bit;
        guint length;
        const char *str;

        service_num = tvb_get_guint8(tvb, offset2);
        str = val_to_str_ext_const(service_num, &intsrv_services_str_ext, "Unknown");
        break_bit = tvb_get_guint8(tvb, offset2+1);
        length = tvb_get_ntohs(tvb, offset2+2);
        ti = proto_tree_add_text(rsvp_object_tree, tvb, offset2,
                                 (length+1)*4, "%s",
                                 str);
        adspec_tree = proto_item_add_subtree(ti,
                                             TREE(TT_ADSPEC_SUBTREE));
        proto_tree_add_text(adspec_tree, tvb, offset2, 1,
                            "Service header %u - %s",
                            service_num, str);
        proto_tree_add_text(adspec_tree, tvb, offset2+1, 1,
                            (break_bit&0x80)?
                            "Break bit set":"Break bit not set");
        proto_tree_add_text(adspec_tree, tvb, offset2+2, 2,
                            "Data length: %u words, not including header",
                            length);
        mylen -= 4;
        offset2 += 4;
        i = length*4;
        while (i > 0) {
            guint8 id;
            guint phdr_length;

            id = tvb_get_guint8(tvb, offset2);
            phdr_length = tvb_get_ntohs(tvb, offset2+2);
            str = try_val_to_str_ext(id, &adspec_params_ext);
            if (str) {
                switch(id) {
                case 4:
                case 8:
                case 10:
                case 133:
                case 134:
                case 135:
                case 136:
                    /* 32-bit unsigned integer */
                    proto_tree_add_text(adspec_tree, tvb, offset2,
                                        (phdr_length+1)<<2,
                                        "%s - %u (type %u, length %u)",
                                        str,
                                        tvb_get_ntohl(tvb, offset2+4),
                                        id, phdr_length);
                    break;

                case 6:
                    /* IEEE float */
                    proto_tree_add_text(adspec_tree, tvb, offset2,
                                        (phdr_length+1)<<2,
                                        "%s - %.10g (type %u, length %u)",
                                        str,
                                        tvb_get_ntohieee_float(tvb, offset2+4),
                                        id, phdr_length);
                    break;
                default:
                    proto_tree_add_text(adspec_tree, tvb, offset2,
                                        (phdr_length+1)<<2,
                                        "%s (type %u, length %u)",
                                        str,
                                        id, phdr_length);
                    break;
                }
            } else {
                proto_tree_add_text(adspec_tree, tvb, offset2,
                                    (phdr_length+1)<<2,
                                    "Unknown (type %u, length %u)",
                                    id, phdr_length);
            }
            offset2 += (phdr_length+1)<<2;
            i -= (phdr_length+1)<<2;
            mylen -= (phdr_length+1)<<2;
        }
    }
}

/*------------------------------------------------------------------------------
 * INTEGRITY
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_integrity(proto_item *ti _U_, proto_tree *rsvp_object_tree,
                       tvbuff_t *tvb,
                       int offset, int obj_length,
                       int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    proto_tree *ti2, *rsvp_integ_flags_tree;
    int         flags;

    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                        "C-type: %u", type);
    flags = tvb_get_guint8(tvb, offset2);
    ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                              "Flags: 0x%02x", flags);
    rsvp_integ_flags_tree = proto_item_add_subtree(ti2, TREE(TT_INTEGRITY_FLAGS));
    proto_tree_add_item(rsvp_integ_flags_tree, hf_rsvp_integrity_flags_handshake,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);
    proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 6,
                        "Key Identifier: %s", tvb_bytes_to_ep_str(tvb, offset2+2, 6));
    proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 8,
                        "Sequence Number: %" G_GINT64_MODIFIER "u", tvb_get_ntoh64(tvb, offset2+8));
    proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, obj_length - 20,
                        "Hash: %s", tvb_bytes_to_ep_str(tvb, offset2+16, obj_length - 20));
}

/*------------------------------------------------------------------------------
 * POLICY
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_policy(proto_item *ti _U_, proto_tree *rsvp_object_tree,
                    tvbuff_t *tvb,
                    int offset, int obj_length,
                    int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                        "C-type: %u", type);
    proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                        "Data (%d bytes)", obj_length - 4);
}

/*------------------------------------------------------------------------------
 * LABEL_REQUEST
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_label_request(proto_item *ti, proto_tree *rsvp_object_tree,
                           tvbuff_t *tvb,
                           int offset, int obj_length,
                           int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;
    static const value_string lab_req_type_str[] = {
        { 1, ""},
        { 2, "(Label Request with ATM label Range)"},
        { 3, "(Label Request with Frame-Relay label Range)"},
        { 4, "(Generalized Label Request)"},
        { 5, "(Generalized Channel_set Label Request)"},
        { 0, NULL }
    };
    static value_string_ext lab_req_type_str_ext = VALUE_STRING_EXT_INIT(lab_req_type_str);

    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                        "C-type: %d %s", type,
                        val_to_str_ext_const(type, &lab_req_type_str_ext, "Unknown"));
    switch(type) {
    case 1: {
        unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "L3PID: %s (0x%04x)",
                            val_to_str_const(l3pid, etype_vals, "Unknown"),
                            l3pid);
        proto_item_set_text(ti, "LABEL REQUEST: Basic: L3PID: %s (0x%04x)",
                            val_to_str_const(l3pid, etype_vals, "Unknown"),
                            l3pid);
        break;
    }

    case 2: {
        unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
        unsigned short min_vpi, min_vci, max_vpi, max_vci;
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "L3PID: %s (0x%04x)",
                            val_to_str_const(l3pid, etype_vals, "Unknown"),
                            l3pid);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
                            "M: %s Merge in Data Plane",
                            (tvb_get_guint8(tvb, offset2+4) & 0x80) ?
                            "1: Can" : "0: Cannot");
        min_vpi = tvb_get_ntohs(tvb, offset2+4) & 0x7f;
        min_vci = tvb_get_ntohs(tvb, offset2+6);
        max_vpi = tvb_get_ntohs(tvb, offset2+8) & 0x7f;
        max_vci = tvb_get_ntohs(tvb, offset2+10);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
                            "Min VPI: %d", min_vpi);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+6, 2,
                            "Min VCI: %d", min_vci);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
                            "Max VPI: %d", max_vpi);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+10, 2,
                            "Max VCI: %d", max_vci);
        proto_item_set_text(ti, "LABEL REQUEST: ATM: L3PID: %s (0x%04x). VPI/VCI: Min: %d/%d, Max: %d/%d. %s Merge. ",
                            val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
                            min_vpi, min_vci, max_vpi, max_vci,
                            (tvb_get_guint8(tvb, offset2+4) & 0x80) ? "Can" : "Cannot");
        break;
    }

    case 3: {
        guint16 l3pid = tvb_get_ntohs(tvb, offset2+2);
        guint32 min_dlci, max_dlci, dlci_len, dlci_len_code;
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "L3PID: %s (0x%04x)",
                            val_to_str_const(l3pid, etype_vals, "Unknown"),
                            l3pid);
        dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
        min_dlci = tvb_get_ntohl(tvb, offset2+4) & 0x7fffff;
        max_dlci = tvb_get_ntohl(tvb, offset2+8) & 0x7fffff;
        switch(dlci_len_code) {
        case 0:
            /* 10-bit DLCIs */
            dlci_len = 10;
            min_dlci &= 0x3ff;
            max_dlci &= 0x3ff;
            break;
        case 2:
            dlci_len = 23;
            break;
        default:
            dlci_len = 0;
            min_dlci = 0;
            max_dlci = 0;
            break;
        }
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
                            "DLCI Length: %s (%d)",
                            (dlci_len==10) ? "10 bits" :
                            (dlci_len==23) ? "23 bits" :
                            "INVALID", dlci_len_code);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 3,
                            "Min DLCI: %d", min_dlci);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 2,
                            "Max DLCI: %d", max_dlci);
        proto_item_set_text(ti, "LABEL REQUEST: Frame: L3PID: %s (0x%04x). DLCI Len: %s. Min DLCI: %d. Max DLCI: %d",
                            val_to_str_const(l3pid, etype_vals, "Unknown"), l3pid,
                            (dlci_len==10) ? "10 bits" :
                            (dlci_len==23) ? "23 bits" :
                            "INVALID", min_dlci, max_dlci);
        break;
    }
    case 4:
    case 5: {
        unsigned short l3pid = tvb_get_ntohs(tvb, offset2+2);
        unsigned char  lsp_enc = tvb_get_guint8(tvb,offset2);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "LSP Encoding Type: %s",
                            rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
                            "Switching Type: %s",
                            rval_to_str(tvb_get_guint8(tvb,offset2+1),
                                        gmpls_switching_type_rvals, "Unknown (%d)"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 2,
                            "G-PID: %s (0x%0x)",
                            rval_to_str(l3pid, gmpls_gpid_rvals,
                                        val_to_str(l3pid, etype_vals,
                                                   "Unknown G-PID(0x%04x)")),
                            l3pid);
        proto_item_set_text(ti, "LABEL REQUEST: Generalized: LSP Encoding=%s, "
                            "Switching Type=%s, G-PID=%s ",
                            rval_to_str(lsp_enc, gmpls_lsp_enc_rvals, "Unknown (%d)"),
                            rval_to_str(tvb_get_guint8(tvb,offset2+1),
                                       gmpls_switching_type_rvals, "Unknown (%d)"),
                            rval_to_str(l3pid, gmpls_gpid_rvals,
                                        val_to_str(l3pid, etype_vals,
                                                   "Unknown (0x%04x)")));
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    } /* switch(type) */
}

/*-----------------------------------------------------------------------------
 * LABEL
 *---------------------------------------------------------------------------*/

/*
   FF: G.694 lambda label, see draft-ietf-ccamp-gmpls-g-694-lambda-labels-05

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Grid | C.S   |    Reserved     |              n                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 */
static void
dissect_glabel_lambda(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                      tvbuff_t *tvb,
                      int offset)
{
    float   freq       = 0.0f;
    guint32 wavelength = 0;
    float   cs_thz     = 0.0f;

    guint8 grid = ((tvb_get_guint8(tvb, offset) & 0xE0) >> 5);
    guint8 cs   = ((tvb_get_guint8(tvb, offset) & 0x1E) >> 1);
    gint16 n    = tvb_get_ntohs(tvb, offset + 2);

    if (grid == 1) {
        /* DWDM grid: Frequency (THz) = 193.1 THz + n * channel spacing (THz) */
        cs_thz =
            cs == 1 ? 0.1f :
            cs == 2 ? 0.05f :
            cs == 3 ? 0.025f :
            cs == 4 ? 0.0125f :
        0.0f;
        freq = 193.1f + (n * cs_thz);
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
                            "Wavelength Label: "
                            "grid=%s, "
                            "channel spacing=%s, "
                            "n=%d, "
                            "freq=%.2fTHz",
                            /* grid */
                            "DWDM",
                            /* channel spacing */
                            cs == 1 ? "100GHz" :
                            cs == 2 ? "50GHz" :
                            cs == 3 ? "25GHz" :
                            cs == 4 ? "12.5GHz" :
                            "unknown",
                            /* n */
                            n,
                            /* frequency */
                            freq);
        proto_item_append_text(ti, ": Wavelength: "
                               "grid=%s, "
                               "channel spacing=%s, "
                               "n=%d, "
                               "freq=%.2fTHz",
                               "DWDM",
                               cs == 1 ? "100GHz" :
                               cs == 2 ? "50GHz" :
                               cs == 3 ? "25GHz" :
                               cs == 4 ? "12.5GHz" :
                               "unknown",
                               n,
                               freq);
    } else if (grid == 2) {
        /* CWDM grid: Wavelength (nm) = 1471 nm + n * 20 nm  */
        wavelength = 1471 + (n * 20);
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
                            "Wavelength Label: "
                            "grid=%s, "
                            "channel spacing=%s, "
                            "n=%d, "
                            "wavelength=%unm",
                            /* grid */
                            "CWDM",
                            /* channel spacing */
                            cs == 1 ? "20nm" :
                            "unknown",
                            /* n */
                            n,
                            /* wavelength */
                            wavelength);
        proto_item_append_text(ti, ": Wavelength: "
                               "grid=%s, "
                               "channel spacing=%s, "
                               "n=%d, "
                               "wavelength=%unm",
                               "CWDM",
                               cs == 1 ? "20nm" :
                               "unknown",
                               n,
                               wavelength);
    } else {
        /* unknown grid: */
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
                            "Wavelength Label: "
                            "grid=%u, "
                            "channel spacing=%u, "
                            "n=%d",
                            grid, cs, n);
        proto_item_append_text(ti, ": Wavelength: "
                               "grid=%u, "
                               "channel spacing=%u, "
                               "n=%d",
                               grid, cs, n);
    }
    return;
}

/*
   FF: SONET/SDH label, see RFC 4606

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |               S               |   U   |   K   |   L   |   M   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
static void
dissect_glabel_sdh(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset)
{
    guint16 s = tvb_get_ntohs(tvb, offset);
    guint8 u = ((tvb_get_guint8(tvb, offset + 2) & 0xF0) >> 4);
    guint8 k = ((tvb_get_guint8(tvb, offset + 2) & 0x0F) >> 0);
    guint8 l = ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);
    guint8 m = ((tvb_get_guint8(tvb, offset + 3) & 0x0F) >> 0);

    proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
                        "SONET/SDH Label: "
                        "S=%u, "
                        "U=%u, "
                        "K=%u, "
                        "L=%u, "
                        "M=%u",
                        s, u, k, l, m);
    proto_item_append_text(ti, ": SONET/SDH: "
                           "S=%u, "
                           "U=%u, "
                           "K=%u, "
                           "L=%u, "
                           "M=%u",
                           s, u, k, l, m);
}

/*
    FF: G.709 label (aka ODUk label), see RFC 4328

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                   Reserved                |     t3    | t2  |t1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
static void
dissect_glabel_g709(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
                    tvbuff_t *tvb,
                    int offset)
{
    guint8 t2 = ((tvb_get_guint8(tvb, offset + 3) & 0x0E) >> 1);
    guint8 t1 = ((tvb_get_guint8(tvb, offset + 3) & 0x01) >> 0);

    guint8 t3 = ((tvb_get_guint8(tvb, offset + 2) & 0x03) << 4);
    t3 |= ((tvb_get_guint8(tvb, offset + 3) & 0xF0) >> 4);

    proto_tree_add_text(rsvp_object_tree, tvb, offset, 4,
                        "G.709 ODUk Label: "
                        "t3=%u, "
                        "t2=%u, "
                        "t1=%u",
                        t3, t2, t1);
    proto_item_append_text(ti, ": G.709 ODUk: "
                        "t3=%u, "
                        "t2=%u, "
                        "t1=%u",
                        t3, t2, t1);
}

static void
dissect_rsvp_label(proto_tree *ti, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length,
                   int rsvp_class, int type)
{
    int         offset2 = offset + 4;
    int         mylen, i;
    const char *name;

    name = (rsvp_class==RSVP_CLASS_SUGGESTED_LABEL ? "SUGGESTED LABEL":
            (rsvp_class==RSVP_CLASS_UPSTREAM_LABEL ? "UPSTREAM LABEL":
             (rsvp_class==RSVP_CLASS_RECOVERY_LABEL ? "RECOVERY LABEL":
             "LABEL")));
    mylen = obj_length - 4;
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 (Packet Label)");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Label: %u",
                            tvb_get_ntohl(tvb, offset2));
        proto_item_set_text(ti, "%s: %u", name,
                            tvb_get_ntohl(tvb, offset2));
        break;

    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 (Generalized Label)");
        if (rsvp_generalized_label_option == 1) {
            /* FF: no generalized label interpretation */
            proto_item_set_text(ti, "%s: Generalized: ", name);
            for (i = 0; i < mylen; i += 4) {
                proto_tree_add_text(rsvp_object_tree, tvb, offset2+i, 4,
                                    "Generalized Label: %u (0x%x)",
                                    tvb_get_ntohl(tvb, offset2+i),
                                    tvb_get_ntohl(tvb, offset2+i));
                if (i < 16) {
                    proto_item_append_text(ti, "0x%x%s",
                                           tvb_get_ntohl(tvb, offset2+i),
                                           i+4<mylen?", ":"");
                } else if (i == 16) {
                    proto_item_append_text(ti, "...");
                }
            }
        } else if (rsvp_generalized_label_option == 2) {
            dissect_glabel_sdh(ti, rsvp_object_tree, tvb, offset2);
        } else if (rsvp_generalized_label_option == 4) {
            dissect_glabel_g709(ti, rsvp_object_tree, tvb, offset2);
        } else if (rsvp_generalized_label_option == 3) {
            dissect_glabel_lambda(ti, rsvp_object_tree, tvb, offset2);
        }
        break;

    case 4:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 4 (Generalized Channel_set)");
        proto_item_append_text(ti, ": Generalized Channel_set");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
                            "Data (%d bytes)", mylen);
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)", type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
                            "Data (%d bytes)", mylen);
        break;
    }
}
/*------------------------------------------------------------------------------
 * LABEL_SET
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_label_set(proto_item *ti, proto_tree *rsvp_object_tree,
                       tvbuff_t *tvb,
                       int offset, int obj_length,
                       int rsvp_class _U_, int type)
{
    int    offset2 = offset + 8;
    guint8 label_type;
    int    len, i;

    static const value_string action_type_vals[] = {
        { 0, "Inclusive list"},
        { 1, "Exclusive list"},
        { 2, "Inclusive range"},
        { 3, "Exclusive range"},
        { 0, NULL}
   };
    static value_string_ext action_type_vals_ext = VALUE_STRING_EXT_INIT(action_type_vals);

    len = obj_length - 8;
    proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: %u", type);
    proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1, "Action: %s",
                        val_to_str_ext(tvb_get_guint8(tvb, offset+4),
                                       &action_type_vals_ext, "Unknown (%u)"));
    proto_item_append_text(ti, ": %s",
                           val_to_str_ext(tvb_get_guint8(tvb, offset+4),
                           &action_type_vals_ext, "Unknown (%u)"));
    label_type = tvb_get_guint8 (tvb, offset+7);
    proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1, "Label type: %s",
                        (label_type == 1) ? "Packet Label" : "Generalized Label");
    proto_item_append_text(ti, ", %s",
                           (label_type == 1) ? "Packet Label: " : "Generalized Label: ");

    for (i = 0; i < len/4; i++) {
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+i*4, 4,
                            "Subchannel %u: %u (0x%x)", i+1,
                            tvb_get_ntohl(tvb, offset2+i*4),
                            tvb_get_ntohl(tvb, offset2+i*4));

        if (i<5) {
            if (i!=0)
                proto_item_append_text(ti, ", ");

            proto_item_append_text(ti, "%u",
                                   tvb_get_ntohl(tvb, offset2+i*4));
        }
    }
}

/*------------------------------------------------------------------------------
 * SESSION ATTRIBUTE
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_session_attribute(proto_item *ti, proto_tree *rsvp_object_tree,
                               tvbuff_t *tvb,
                               int offset, int obj_length,
                               int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    guint8      flags;
    guint8      name_len;
    proto_tree *ti2, *rsvp_sa_flags_tree;

    switch(type) {
    case 1:
    case 7:

        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: %u - IPv4 LSP (%sResource Affinities)",
                            type, (type == 1) ? "" : "No ");

        if (type == 1) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset2));
            proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
                            "Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset2+4));
            proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
                            "Include-All: 0x%0x", tvb_get_ntohl(tvb, offset2+8));
            offset2 = offset2+12;
        }

        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
                            "Setup priority: %u",
                            tvb_get_guint8(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
                            "Hold priority: %u",
                            tvb_get_guint8(tvb, offset2+1));
        flags = tvb_get_guint8(tvb, offset2+2);
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+2, 1,
                                  "Flags: 0x%02x", flags);
        rsvp_sa_flags_tree = proto_item_add_subtree(ti2,
                                                    TREE(TT_SESSION_ATTRIBUTE_FLAGS));
        proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_local,
                             tvb, offset2+2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_label,
                             tvb, offset2+2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_se_style,
                             tvb, offset2+2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_bandwidth,
                             tvb, offset2+2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_sa_flags_tree, hf_rsvp_sa_flags_node,
                             tvb, offset2+2, 1, ENC_BIG_ENDIAN);

        name_len = tvb_get_guint8(tvb, offset2+3);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
                            "Name length: %u", name_len);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, name_len,
                            "Name: %s",
                            tvb_format_text(tvb, offset2+4, name_len));

        proto_item_set_text(ti, "SESSION ATTRIBUTE: SetupPrio %d, HoldPrio %d, %s%s%s%s%s [%s]",
                            tvb_get_guint8(tvb, offset2),
                            tvb_get_guint8(tvb, offset2+1),
                            flags &0x01 ? "Local Protection, " : "",
                            flags &0x02 ? "Label Recording, " : "",
                            flags &0x04 ? "SE Style, " : "",
                            flags &0x08 ? "Bandwidth Protection, " : "",
                            flags &0x10 ? "Node Protection, " : "",
                            name_len ? tvb_format_text(tvb, offset2+4, name_len) : "");
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS,
 * RFC 3209, RFC 3473, RFC 5420, RFC 4873, RFC 5553
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_ero_rro_subobjects(proto_tree *ti, proto_tree *rsvp_object_tree,
                                tvbuff_t *tvb,
                                int offset, int obj_length, int rsvp_class)
{
    int         i, j, k, l, flags;
    proto_tree *ti2, *rsvp_ro_subtree, *rsvp_rro_flags_subtree;
    int         tree_type;

    switch(rsvp_class) {
    case RSVP_CLASS_EXPLICIT_ROUTE:
        tree_type = TREE(TT_EXPLICIT_ROUTE_SUBOBJ);
        break;
    case RSVP_CLASS_RECORD_ROUTE:
        tree_type = TREE(TT_RECORD_ROUTE_SUBOBJ);
        break;
    default:
        /* Bail out */
        return;
    }

    for (i=1, l = 0; l < obj_length - 4; i++) {
        j = tvb_get_guint8(tvb, offset+l) & 0x7f;
        switch(j) {
        case 1: /* IPv4 */
            k = tvb_get_guint8(tvb, offset+l) & 0x80;
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 8,
                                      "IPv4 Subobject - %s%s",
                                      tvb_ip_to_str(tvb, offset+l+2),
                                      rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
                                      (k ? ", Loose" : ", Strict") : "");
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    k ? "Loose Hop " : "Strict Hop");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 1 (IPv4)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 4,
                                "IPv4 hop: %s",
                                tvb_ip_to_str(tvb, offset+l+2));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+6, 1,
                                "Prefix length: %u",
                                tvb_get_guint8(tvb, offset+l+6));
            if (i < 4) {
                proto_item_append_text(ti, "IPv4 %s%s",
                                       tvb_ip_to_str(tvb, offset+l+2),
                                       k ? " [L]" : "");
            }
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
                flags = tvb_get_guint8(tvb, offset+l+7);
                if (flags&0x10) {
                    proto_item_append_text(ti,  " (Node-id)");
                    proto_item_append_text(ti2, " (Node-id)");
                }
                if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
                if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
                if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
                if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
                ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+7, 1,
                                          "Flags: 0x%02x", flags);
                rsvp_rro_flags_subtree =
                    proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
                             tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
                             tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_bandwidth,
                             tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node,
                             tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
                             tvb, offset+l+7, 1, ENC_BIG_ENDIAN);
            }

            break;

        case 2: /* IPv6 */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 20,
                                      "IPv6 Subobject");
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            k = tvb_get_guint8(tvb, offset+l) & 0x80;
            if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    k ? "Loose Hop " : "Strict Hop");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 2 (IPv6)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 16,
                                "IPv6 hop: %s",
                                tvb_ip6_to_str(tvb, offset+l+2));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+18, 1,
                                "Prefix length: %u",
                                tvb_get_guint8(tvb, offset+l+18));
            if (i < 4) {
                proto_item_append_text(ti, "IPv6 [...]%s", k ? " [L]":"");
            }
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
                flags = tvb_get_guint8(tvb, offset+l+19);
                if (flags&0x10) {
                    proto_item_append_text(ti,  " (Node-id)");
                    proto_item_append_text(ti2, " (Node-id)");
                }
                if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
                if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
                if (flags&0x04) proto_item_append_text(ti2, ", Backup BW Avail");
                if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
                ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+19, 1,
                                          "Flags: 0x%02x", flags);
                rsvp_rro_flags_subtree =
                    proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));

                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
                             tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
                             tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_bandwidth,
                             tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_backup_tunnel_hop,
                             tvb, offset+l+19, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_node_address,
                             tvb, offset+l+19, 1, ENC_BIG_ENDIAN);

            }

            break;

        case 3: /* Label RFC 3477 */
            k = tvb_get_guint8(tvb, offset+l) & 0x80;
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 8,
                                      "Label Subobject - %d, %s",
                                      tvb_get_ntohl(tvb, offset+l+4),
                                      rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
                                      (k ? "Loose" : "Strict") : "");
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    k ? "Loose Hop " : "Strict Hop");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 3 (Label)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
                flags = tvb_get_guint8(tvb, offset+l+2);
                if (flags&0x01) proto_item_append_text(ti2, "The label will be understood if received on any interface");
                ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
                                          "Flags: 0x%02x", flags);
                rsvp_rro_flags_subtree =
                    proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));

                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_global_label,
                             tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
            }
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+3, 1,
                                "C-Type: %u",
                                tvb_get_guint8(tvb, offset+l+3));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
                                "Label: %d",
                                tvb_get_ntohl(tvb, offset+l+4));
            if (i < 4) {
                proto_item_append_text(ti, "Label %d%s",
                                       tvb_get_ntohl(tvb, offset+l+4),
                                       k ? " [L]":"");
            }
            break;

        case 4: /* Unnumbered Interface-ID RFC 3477, RFC 6107*/
            k = tvb_get_guint8(tvb, offset+l) & 0x80;
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 8,
                                      "Unnumbered Interface-ID - %s, %d, %s",
                                      tvb_ip_to_str(tvb, offset+l+4),
                                      tvb_get_ntohl(tvb, offset+l+8),
                                      rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE ?
                                      (k ? "Loose" : "Strict") : "");
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    k ? "Loose Hop " : "Strict Hop");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 4 (Unnumbered Interface-ID)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) {
                flags = tvb_get_guint8(tvb, offset+l+2);
                if (flags&0x01) proto_item_append_text(ti2, ", Local Protection Available");
                if (flags&0x02) proto_item_append_text(ti2, ", Local Protection In Use");
                ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
                                          "Flags: 0x%02x", flags);
                rsvp_rro_flags_subtree =
                    proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_avail,
                             tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_rro_flags_subtree, hf_rsvp_rro_flags_local_in_use,
                             tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
            }
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
                                "Router-ID: %s",
                                tvb_ip_to_str(tvb, offset+l+4));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8, 4,
                                "Interface-ID: %d",
                                tvb_get_ntohl(tvb, offset+l+8));
            if (i < 4) {
                proto_item_append_text(ti, "Unnum %s/%d%s",
                                       tvb_ip_to_str(tvb, offset+l+4),
                                       tvb_get_ntohl(tvb, offset+l+8),
                                       k ? " [L]":"");
            }
            break;

        case 32: /* AS */
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
            k = tvb_get_ntohs(tvb, offset+l+2);
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 4,
                                      "Autonomous System %u",
                                      k);
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 32 (Autonomous System Number)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
                                "Autonomous System %u", k);
            if (i < 4) {
                proto_item_append_text(ti, "AS %d",
                                       tvb_get_ntohs(tvb, offset+l+2));
            }
            break;

        case 64: /* PKSv4 - RFC5520 */
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
            k = tvb_get_ntohs(tvb, offset+l+2);
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 8,
                                      "Path Key subobject - %s, %u",
                                      tvb_ip_to_str(tvb, offset+l+4),
                                      k);
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 64 (Path Key with IPv4 PCE-ID)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
                                "Path Key: %u", k);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
                                "PCE-ID: %s",
                                tvb_ip_to_str(tvb, offset+l+4));
            if (i < 4) {
                proto_item_append_text(ti, "Path Key %d", k);
            }
            break;

        case 65: /* PKSv6 - RFC5520 */
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE) goto defaultsub;
            k = tvb_get_ntohs(tvb, offset+l+2);
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l, 8,
                                      "Path Key subobject - %s, %u",
                                      tvb_ip6_to_str(tvb, offset+l+4),
                                      k);
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: 65 (Path Key with IPv6 PCE-ID)");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 2,
                                "Path Key: %u", k);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
                                "PCE-ID: %s",
                                tvb_ip6_to_str(tvb, offset+l+4));
            if (i < 4) {
                proto_item_append_text(ti, "Path Key %d", k);
            }
            break;

        case 124:
        case 125:
        case 126:
        case 127:
            /*
             * FF: Types 124 through 127 are to be reserved for Vendor
             * Private Use (see RFC 3936, Section 2.3.1) in case of
             * EXPLICIT_ROUTE (aka ERO).
             */
            if (rsvp_class == RSVP_CLASS_RECORD_ROUTE)
                goto defaultsub;
            else
                goto privatesub;
            break;

        case 252:
        case 253:
        case 254:
        case 255:
            /*
             * FF: Types 252 through 255 are to be reserved for Vendor
             * Private Use (see RFC 3936, Section 2.3.1) in case of
             * RECORD_ROUTE (aka RRO).
             */
            if (rsvp_class == RSVP_CLASS_EXPLICIT_ROUTE)
                goto defaultsub;
            else
                goto privatesub;
            break;

        privatesub: /* Private subobject */
            /*
             * FF: The first four octets of the sub-object contents of
             * a Vendor Private sub-object of an EXPLICIT_ROUTE or
             * RECORD_ROUTE object MUST be that vendor's SMI enterprise
             * code in network octet order.
             */
            {
                guint8 private_so_len = tvb_get_guint8(tvb, offset+l+1);
                k = tvb_get_guint8(tvb, offset+l) & 0x80;
                ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+l,
                                          tvb_get_guint8(tvb, offset+l+1),
                                          "Private Subobject: %d", j);
                rsvp_ro_subtree =
                    proto_item_add_subtree(ti2, tree_type);
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    k ? "Loose Hop " : "Strict Hop");
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                    "Type: %u (Private)", j);
                proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                    "Length: %u",
                                    private_so_len);

                proto_tree_add_item(rsvp_ro_subtree,
                                    hf_rsvp_filter[RSVPF_ENT_CODE],
                                    tvb, offset+l+4, 4, ENC_BIG_ENDIAN);
                if (private_so_len > 8) {
                    /* some private data */
                    proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8,
                                        private_so_len - 8,
                                        "Data (%d bytes)",
                                        private_so_len - 8);
                }
            }
            break;

        default: /* Unknown subobject */
        defaultsub:
            k = tvb_get_guint8(tvb, offset+l) & 0x80;
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset+l,
                                      tvb_get_guint8(tvb, offset+l+1),
                                      "Unknown subobject: %d", j);
            rsvp_ro_subtree =
                proto_item_add_subtree(ti2, tree_type);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                k ? "Loose Hop " : "Strict Hop");
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
                                "Type: %u (Unknown)", j);
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                                "Length: %u",
                                tvb_get_guint8(tvb, offset+l+1));
            break;
        }

        if (tvb_get_guint8(tvb, offset+l+1) < 1) {
            proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
                "Invalid length: %u", tvb_get_guint8(tvb, offset+l+1));
            return;
        }
        l += tvb_get_guint8(tvb, offset+l+1);
        if (l < obj_length - 4) {
            if (i < 4)
                proto_item_append_text(ti, ", ");
            else if (i==4)
                proto_item_append_text(ti, "...");
        }
    }
}

/*------------------------------------------------------------------------------
 * FF: EXCLUDE ROUTE SUBOBJECTS (they do not share ERO/RRO code points, they may
 * share ERO/RRO subobjects layout).
 * RFC 4874
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_xro_subobjects(proto_tree *ti, proto_tree *rsvp_object_tree,
                            tvbuff_t *tvb, int offset, int obj_length,
                            int rsvp_class)
{
    int i, lbit, type, l;
    proto_tree *ti2, *rsvp_xro_subtree;
    int tree_type;

    switch (rsvp_class) {
    case RSVP_CLASS_EXCLUDE_ROUTE:
        tree_type = TREE(TT_EXCLUDE_ROUTE_SUBOBJ);
        break;
    default:
        /* Bail out */
        return;
    }

    /*  0                   1                   2                   3    */
    /*  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1  */
    /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
    /* |L|    Type     |     Length    |           Value...            | */
    /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */

    for (i = 1, l = 0; l < obj_length - 4; i++) {
        lbit = tvb_get_guint8(tvb, offset + l) & 0x80;
        type = tvb_get_guint8(tvb, offset + l) & 0x7f;
        switch (type) {
        case 1: /* IPv4 */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset + l, 8,
                                      "IPv4 Subobject - %s",
                                      tvb_ip_to_str(tvb, offset + l + 2));
            rsvp_xro_subtree =
                proto_item_add_subtree(ti2, tree_type);

            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_lbit,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_type,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_len,
                                tvb, offset + l + 1, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv4_addr,
                                tvb, offset + l + 2, 4, ENC_BIG_ENDIAN);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv4_prefix,
                                tvb, offset + l + 6, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv4_attr,
                                tvb, offset + l + 7, 1, ENC_NA);
            if (i < 4) {
                proto_item_append_text(ti, "IPv4 %s%s",
                                       tvb_ip_to_str(tvb, offset + l + 2),
                                       lbit ? " [L]" : "");
            }
            break;

        case 2: /* IPv6 */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset + l, 20,
                                      "IPv6 Subobject - %s",
                                      tvb_ip6_to_str(tvb, offset + l + 2));
            rsvp_xro_subtree =
                proto_item_add_subtree(ti2, tree_type);

            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_lbit,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_type,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_len,
                                tvb, offset + l + 1, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv6_addr,
                                tvb, offset + l + 2, 16, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv6_prefix,
                                tvb, offset + l + 18, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_ipv6_attr,
                                tvb, offset + l + 19, 1, ENC_NA);
            if (i < 4) {
                proto_item_append_text(ti, "IPv6 [...]%s", lbit ? " [L]" : "");
            }
            break;

        case 34: /* SRLG */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset + l, 8,
                                      "SRLG Subobject - %u",
                                      tvb_get_ntohl(tvb, offset + l + 2));
            rsvp_xro_subtree =
                proto_item_add_subtree(ti2, tree_type);

            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_lbit,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_type,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_len,
                                tvb, offset + l + 1, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_srlg_id,
                                tvb, offset + l + 2, 4, ENC_BIG_ENDIAN);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_srlg_res,
                                tvb, offset + l + 6, 2, ENC_NA);
            if (i < 4) {
                proto_item_append_text(ti, "SRLG %u%s",
                                       tvb_get_ntohl(tvb, offset + l + 2),
                                       lbit ? " [L]" : "");
            }
            break;
        default: /* Unknown subobject */
            ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                      offset + l,
                                      tvb_get_guint8(tvb, offset + l + 1),
                                      "Unknown subobject: %d", type);
            rsvp_xro_subtree =
                proto_item_add_subtree(ti2, tree_type);

            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_lbit,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_type,
                                tvb, offset + l, 1, ENC_NA);
            proto_tree_add_item(rsvp_xro_subtree, hf_rsvp_xro_sobj_len,
                                tvb, offset + l + 1, 1, ENC_NA);
            break;
        }

        if (tvb_get_guint8(tvb, offset + l + 1) < 1) {
            proto_tree_add_text(rsvp_xro_subtree, tvb, offset + l + 1, 1,
                                "Invalid Length: %u",
                                tvb_get_guint8(tvb, offset + l + 1));
            return;
        }

        l += tvb_get_guint8(tvb, offset + l + 1);

        if (l < obj_length - 4) {
            if (i < 4)
                proto_item_append_text(ti, ", ");
            else if (i == 4)
                proto_item_append_text(ti, "...");
        }
    }
}

/*------------------------------------------------------------------------------
 * EXPLICIT ROUTE OBJECT
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_explicit_route(proto_item *ti, proto_tree *rsvp_object_tree,
                            tvbuff_t *tvb,
                            int offset, int obj_length,
                            int rsvp_class, int type)
{
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_item_set_text(ti, "EXPLICIT ROUTE: ");

        dissect_rsvp_ero_rro_subobjects(ti, rsvp_object_tree, tvb,
                                        offset + 4, obj_length, rsvp_class);
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * RECORD ROUTE OBJECT
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_record_route(proto_item *ti, proto_tree *rsvp_object_tree,
                          tvbuff_t *tvb,
                          int offset, int obj_length,
                          int rsvp_class, int type)
{
    proto_item_set_text(ti, "RECORD ROUTE: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");

        dissect_rsvp_ero_rro_subobjects(ti, rsvp_object_tree, tvb,
                                        offset + 4, obj_length, rsvp_class);
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * EXCLUDE ROUTE OBJECT
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_exclude_route(proto_item *ti, proto_tree *rsvp_object_tree,
                           tvbuff_t *tvb, int offset, int obj_length,
                           int rsvp_class, int ctype)
{
    proto_item_set_text(ti, "EXCLUDE ROUTE: ");
    switch (ctype) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                            "C-type: 1");
        dissect_rsvp_xro_subobjects(ti, rsvp_object_tree, tvb,
                                    offset + 4, obj_length,
                                    rsvp_class);
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                            "C-type: Unknown (%u)",
                            ctype);
        proto_tree_add_text(rsvp_object_tree, tvb, offset + 4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * MESSAGE ID
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_message_id(proto_tree *ti, proto_tree *rsvp_object_tree,
                        tvbuff_t *tvb,
                        int offset, int obj_length,
                        int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
                            "Flags: %d", tvb_get_guint8(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
                            "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
        proto_item_set_text(ti, "MESSAGE-ID: %d %s",
                            tvb_get_ntohl(tvb, offset+8),
                            tvb_get_guint8(tvb, offset+4) & 1 ? "(Ack Desired)" : "");
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * MESSAGE ID ACK
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_message_id_ack(proto_tree *ti, proto_tree *rsvp_object_tree,
                            tvbuff_t *tvb,
                            int offset, int obj_length,
                            int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
                            "Flags: %d", tvb_get_guint8(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
                            "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
        proto_item_set_text(ti, "MESSAGE-ID ACK: %d", tvb_get_ntohl(tvb, offset+8));
        break;

    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
                            "Flags: %d", tvb_get_guint8(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
                            "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Message-ID: %d", tvb_get_ntohl(tvb, offset+8));
        proto_item_set_text(ti, "MESSAGE-ID NACK: %d", tvb_get_ntohl(tvb, offset+8));
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * MESSAGE ID LIST
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_message_id_list(proto_tree *ti, proto_tree *rsvp_object_tree,
                             tvbuff_t *tvb,
                             int offset, int obj_length,
                             int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;
    int mylen;

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
                            "Flags: %d", tvb_get_guint8(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 3,
                            "Epoch: %d", tvb_get_ntoh24(tvb, offset+5));
        for (mylen = 8; mylen < obj_length; mylen += 4)
            proto_tree_add_text(rsvp_object_tree, tvb, offset+mylen, 4,
                                "Message-ID: %d", tvb_get_ntohl(tvb, offset+mylen));
        proto_item_set_text(ti, "MESSAGE-ID LIST: %d IDs",
                            (obj_length - 8)/4);
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * HELLO
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_hello(proto_tree *ti, proto_tree *rsvp_object_tree,
                   tvbuff_t *tvb,
                   int offset, int obj_length _U_,
                   int rsvp_class _U_, int type)
{
    switch(type) {
    case 1:
    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-Type: %d - HELLO %s object",
                            tvb_get_guint8 (tvb, offset+3),
                            type==1 ? "REQUEST" : "ACK");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
                            "Source Instance: 0x%x",tvb_get_ntohl(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Destination Instance: 0x%x",tvb_get_ntohl(tvb, offset+8));
        proto_item_append_text(ti, ": %s. Src Instance: 0x%0x. Dest Instance: 0x%0x. ",
                               type==1 ? "REQUEST" : "ACK",
                               tvb_get_ntohl(tvb, offset+4),
                               tvb_get_ntohl(tvb, offset+8));
        break;
    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-Type: %d - UNKNOWN", type);
        break;
    };
}

/*------------------------------------------------------------------------------
 * DCLASS
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_dclass(proto_tree *ti, proto_tree *rsvp_object_tree,
                    tvbuff_t *tvb,
                    int offset, int obj_length,
                    int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;
    int mylen;

    proto_item_set_text(ti, "DCLASS: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        for (mylen = 4; mylen < obj_length; mylen += 4) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset+mylen+3, 1,
                                "DSCP: %s",
                                val_to_str_ext(tvb_get_guint8(tvb, offset+mylen+3),
                                               &dscp_vals_ext, "Unknown (%d)"));
            proto_item_append_text(ti, "%d%s",
                                   tvb_get_guint8(tvb, offset+mylen+3)>>2,
                                   mylen==obj_length-4 ? "":
                                   mylen<16 ? ", ":
                                   mylen==16 ? ", ..." : "");
        }
        break;

    default:
        mylen = obj_length - 4;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
                            "Data (%d bytes)", mylen);
        break;
    }
}

/*------------------------------------------------------------------------------
 * ADMINISTRATIVE STATUS
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_admin_status(proto_tree *ti, proto_tree *rsvp_object_tree,
                          tvbuff_t *tvb,
                          int offset, int obj_length,
                          int rsvp_class _U_, int type)
{
    int         offset2 = offset + 4;
    proto_tree *ti2, *rsvp_admin_subtree;
    guint32     status;

    proto_item_set_text(ti, "ADMIN STATUS: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        status = tvb_get_ntohl(tvb, offset2);
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                                  "Admin Status: 0x%08x", status);
        rsvp_admin_subtree =
            proto_item_add_subtree(ti2, TREE(TT_ADMIN_STATUS_FLAGS));

        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
                               tvb, offset2, 4, status);
        proto_tree_add_boolean(rsvp_admin_subtree,
                               hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
                               tvb, offset2, 4, status);
        proto_item_set_text(ti, "ADMIN-STATUS: %s%s%s%s%s%s%s%s",
                            (status & (1<<31)) ? "Reflect " : "",
                            (status & (1<<6)) ? "Handover " : "",
                            (status & (1<<5)) ? "Lockout " : "",
                            (status & (1<<4)) ? "Inhibit " : "",
                            (status & (1<<3)) ? "Call " : "",
                            (status & (1<<2)) ? "Testing " : "",
                            (status & (1<<1)) ? "Admin-Down " : "",
                            (status & (1<<0)) ? "Deleting " : "");
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * LSP ATTRIBUTES
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_lsp_attributes(proto_tree *ti, proto_tree *rsvp_object_tree,
                            tvbuff_t *tvb, int offset, int obj_length,
                            int rsvp_class _U_, int type)
{
    int         tlv_off;
    guint32     attributes;
    guint16     tlv_type, tlv_len;
    proto_tree *ti2, *rsvp_lsp_attr_subtree;

    if (rsvp_class == RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES)
        proto_item_set_text(ti, "LSP REQUIRED ATTRIBUTES: ");
    else
        proto_item_set_text(ti, "LSP ATTRIBUTES: ");

    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        for (tlv_off = 4; tlv_off < obj_length-4; ) {
            tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
            tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);

            if ((tlv_len == 0) || (tlv_off+tlv_len > obj_length)) {
                proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
                                    "Invalid length");
                return;
            }
            switch(tlv_type) {
            case 1:
                attributes = tvb_get_ntohl(tvb, offset+tlv_off+4);
                ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
                                          "LSP attributes TLV: 0x%08x", attributes);
                rsvp_lsp_attr_subtree = proto_item_add_subtree(ti2, TREE(TT_LSP_ATTRIBUTES_FLAGS));
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_e2e,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_boundary,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_segment,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_integrity,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_contiguous,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_stitching,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_preplanned,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_nophp,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_oobmap,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_entropy,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_srlgcollect,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_costcollect,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_latcollect,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);
                proto_tree_add_item(rsvp_lsp_attr_subtree, hf_rsvp_lsp_attr_latvarcollect,
                             tvb, offset+tlv_off+4, 4, ENC_BIG_ENDIAN);

                proto_item_append_text(ti, "LSP Attribute:%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
                                       (attributes & 0x00000001) ? " End-to-end re-routing" : "",
                                       (attributes & 0x00000002) ? " Boundary re-routing" : "",
                                       (attributes & 0x00000004) ? " Segment-based re-routing" : "",
                                       (attributes & 0x00000008) ? " LSP Integrity Required" : "",
                                       (attributes & 0x00000010) ? " Contiguous LSP" : "",
                                       (attributes & 0x00000020) ? " LSP stitching desired" : "",
                                       (attributes & 0x00000040) ? " Pre-Planned LSP Flag" : "",
                                       (attributes & 0x00000080) ? " Non-PHP behavior flag" : "",
                                       (attributes & 0x00000100) ? " OOB mapping flag" : "",
                                       (attributes & 0x00000200) ? " Entropy Label Capability" : "",
                                       (attributes & 0x00000400) ? " SRLG Collection Flag" : "",
                                       (attributes & 0x00000800) ? " Cost Collection Flag" : "",
                                       (attributes & 0x00001000) ? " Latency Collection Flag" : "",
                                       (attributes & 0x00002000) ? " Latency Variation Flag" : "");
                break;

            default:
                proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, tlv_len,
                                    "Unknown TLV");
                break;
            }
            tlv_off += tlv_len;
        }
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * ASSOCIATION
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_association(proto_tree *ti, proto_tree *rsvp_object_tree,
                         tvbuff_t *tvb,
                         int offset, int obj_length,
                         int rsvp_class _U_, int type)
{
    guint16 association_type;
    guint16 association_id;

    static const value_string association_type_vals[] = {
        { 0, "Reserved"},
        { 1, "Recovery"},
        { 2, "Resource Sharing"},
        { 3, "Segment Recovery"},
        { 4, "Inter-domain Recovery"},
        { 0, NULL}
    };
    static value_string_ext association_type_vals_ext = VALUE_STRING_EXT_INIT(association_type_vals);

    proto_item_set_text(ti, "ASSOCIATION ");
    association_type = tvb_get_ntohs (tvb, offset + 4);
    association_id = tvb_get_ntohs (tvb, offset + 6);
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 (IPv4)");
        proto_item_append_text(ti, "(IPv4): ");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
                            "Association type: %s",
                            val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_item_append_text(ti, "%s. ",
                               val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
                            "Association ID: %u", association_id);
        proto_item_append_text(ti, "ID: %u. ", association_id);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Association source: %s", tvb_ip_to_str(tvb, offset+8));
        proto_item_append_text(ti, "Src: %s", tvb_ip_to_str(tvb, offset+8));
        break;

    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 (IPv6)");
        proto_item_append_text(ti, "(IPv6): ");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
                            "Association type: %s",
                            val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_item_append_text(ti, "%s. ",
                               val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
                            "Association ID: %u", association_id);
        proto_item_append_text(ti, "ID: %u. ", association_id);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 16,
                            "Association source: %s", tvb_ip6_to_str(tvb, offset+8));
        proto_item_append_text(ti, "Src: %s", tvb_ip6_to_str(tvb, offset+8));
        break;

    case 4:       /* oif2008.389 */
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 4 (Routing Area)");
        proto_item_append_text(ti, "(Routing Area): ");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
                            "Association type: %s",
                            val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_item_append_text(ti, "%s. ",
                               val_to_str_ext(association_type, &association_type_vals_ext, "Unknown (%u)"));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 2,
                            "Association ID: %u", association_id);
        proto_item_append_text(ti, "Association ID: %u, ", association_id);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Routing Area ID: %u", tvb_get_ntohl (tvb, offset+8));
        proto_item_append_text(ti, "Routing Area ID: %u, ", tvb_get_ntohl (tvb, offset+8));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
                            "Node ID: %s", tvb_ip_to_str(tvb, offset+12));
        proto_item_append_text(ti, "Node ID: %s", tvb_ip_to_str(tvb, offset+12));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 16,
                            "Padding: %s", tvb_bytes_to_ep_str_punct(tvb, offset+16, 8, ' '));
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)", type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}
/*------------------------------------------------------------------------------
 * TLVs for LSP TUNNEL IF ID object
 * draft-ietf-ccamp-lsp-hierarchy-bis-02
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
                                  tvbuff_t *tvb, int offset, int tlv_length,
                                  int subtree_type)
{
    int       tlv_off;
    guint16   tlv_type;
    int       tlv_len;
    proto_tree *ti, *rsvp_lsp_tunnel_if_id_subtree;

    for (tlv_off = 0; tlv_off < tlv_length; ) {
        tlv_type = tvb_get_ntohs(tvb, offset+tlv_off);
        tlv_len = tvb_get_ntohs(tvb, offset+tlv_off+2);

        if ((tlv_len == 0) || ((tlv_off+tlv_len) > tlv_length)) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off+2, 2,
                                "Invalid length");
            return;
        }
        switch(tlv_type) {
        case 1:
            ti = proto_tree_add_text(rsvp_object_tree, tvb,
                                     offset+tlv_off, tlv_len,
                                     "Unnumbered component link identifier: %u",
                                     tvb_get_ntohl(tvb, offset+tlv_off+4));
            rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
                                "Type: 1 (Unnumbered component link identifier)");
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 4,
                                "Component link identifier: %u",
                                tvb_get_ntohl(tvb, offset+tlv_off+4));
            break;

        case 2:
            ti = proto_tree_add_text(rsvp_object_tree, tvb,
                                     offset+tlv_off, tlv_len,
                                     "IPv4 component link identifier: %s",
                                     tvb_ip_to_str(tvb, offset+tlv_off+4));
            rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
                                "Type: 2 (IPv4 component link identifier)");
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 4,
                                "Component link identifier: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+4));
            break;

        case 32769:  /* oif-p0040.002.09 demo spec */
            ti = proto_tree_add_text(rsvp_object_tree, tvb,
                                     offset+tlv_off, tlv_len,
                                     "Targeted client layer: ");
            rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
                                "Type: 32769 (Targeted client layer)");
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+2, 2,
                                "Length: %u", tlv_len);
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 1,
                                "LSP Encoding Type: %s",
                                rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
                                           gmpls_lsp_enc_rvals, "Unknown (%d)"));
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+5, 1,
                                "Switching Type: %s",
                                rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+5),
                                           gmpls_switching_type_rvals, "Unknown (%d)"));
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+6, 1,
                                "Signal Type: %s",
                                val_to_str_ext(tvb_get_guint8(tvb,offset+tlv_off+6),
                                               &gmpls_sonet_signal_type_str_ext, "Unknown (%d)"));
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+8, 8,
                                "Sub Interface/Connection ID: %" G_GINT64_MODIFIER "u (0x%s)",
                                tvb_get_ntoh64(tvb, offset+tlv_off+8),
                                tvb_bytes_to_ep_str(tvb, offset+tlv_off+8, 8));
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+16, 4,
                                "SC PC ID: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+16));
            proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+20, 4,
                                "SC PC SCN Address: %s",
                                tvb_ip_to_str(tvb, offset+tlv_off+20));
            proto_item_append_text(ti, "LSP Encoding=%s, Switching Type=%s, Signal Type=%s",
                                   rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
                                              gmpls_lsp_enc_rvals, "Unknown (%d)"),
                                   rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+5),
                                              gmpls_switching_type_rvals, "Unknown (%d)"),
                                   val_to_str_ext(tvb_get_guint8(tvb,offset+tlv_off+6),
                                                  &gmpls_sonet_signal_type_str_ext, "Unknown (%d)"));
            break;

        default:
            proto_tree_add_text(rsvp_object_tree, tvb, offset+tlv_off, 2,
                                "Unknown TLV: %u", tlv_type);
            break;
        }
        tlv_off += tlv_len;
    }
}

/*------------------------------------------------------------------------------
 * LSP TUNNEL INTERFACE ID
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_lsp_tunnel_if_id(proto_tree *ti, proto_tree *rsvp_object_tree,
                              tvbuff_t *tvb,
                              int offset, int obj_length,
                              int rsvp_class _U_, int type)
{
    guint8  action;

    static const value_string lsp_tunnel_if_id_action_str[] = {
        { 0, "LSP is FA (MPLS-TE topology advertisement only)"},
        { 1, "LSP is RA (IP network advertisement only)"},
        { 2, "LSP is RA (both IP and MPLS-TE topology advertisement)"},
        { 3, "LSP is to be used as a virtual local link"},
        { 0, NULL}
    };

    proto_item_set_text(ti, "LSP INTERFACE-ID: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - Unnumbered interface");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
                            "Router ID: %s",
                            tvb_ip_to_str(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
        proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered, Router-ID %s, Interface-ID %d",
                            tvb_ip_to_str(tvb, offset+4),
                            tvb_get_ntohl(tvb, offset+8));
        break;

    case 2:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv4");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
                            "IPv4 interface address: %s",
                            tvb_ip_to_str(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Target IGP instance: %s",
                            tvb_ip_to_str(tvb, offset+8));
        proto_item_set_text(ti, "LSP INTERFACE-ID: IPv4, interface address %s,"
                            "IGP instance %s",
                            tvb_ip_to_str(tvb, offset+4),
                            tvb_ip_to_str(tvb, offset+8));
        action = tvb_get_guint8(tvb, offset+12);
        action >>= 4;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 1, "Action: %d - %s",
                            action,
                            val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
        dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+16, obj_length-16,
                                          TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
        break;

    case 3:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 3 - IPv6");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 16,
                            "IPv6 interface address: %s",
                            tvb_ip6_to_str(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
                            "Target IGP instance: %s",
                            tvb_ip_to_str(tvb, offset+20));
        proto_item_set_text(ti, "LSP INTERFACE-ID: IPv6, interface address %s,"
                            "IGP instance %s",
                            tvb_ip6_to_str(tvb, offset+4),
                            tvb_ip_to_str(tvb, offset+20));
        action = tvb_get_guint8(tvb, offset+24);
        action >>= 4;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+24, 1, "Action: %d - %s",
                            action,
                            val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
        dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+28, obj_length-28,
                                          TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
        break;

    case 4:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 4 - Unnumbered interface with target");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
                            "Router ID: %s",
                            tvb_ip_to_str(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
                            "Target IGP instance: %s",
                            tvb_ip_to_str(tvb, offset+12));
        proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered with target, Router-ID %s,"
                            " Interface-ID %d, IGP instance %s",
                            tvb_ip_to_str(tvb, offset+4),
                            tvb_get_ntohl(tvb, offset+8),
                            tvb_ip_to_str(tvb, offset+12));
        action = tvb_get_guint8(tvb, offset+16);
        action >>= 4;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 1, "Action: %d - %s",
                            action,
                            val_to_str_const(action, lsp_tunnel_if_id_action_str, "Unknown"));
        dissect_rsvp_lsp_tunnel_if_id_tlv(rsvp_object_tree, tvb, offset+20, obj_length-20,
                                          TREE(TT_LSP_TUNNEL_IF_ID_SUBTREE));
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length-4,
                            "Data (%d bytes)", obj_length-4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * NOTIFY REQUEST
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_notify_request(proto_item *ti, proto_tree *rsvp_object_tree,
                            tvbuff_t *tvb,
                            int offset, int obj_length,
                            int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    switch(type) {
    case 1: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1 - IPv4");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Notify node address: %s",
                            tvb_ip_to_str(tvb, offset2));
        proto_item_append_text(ti, ": Notify node: %s",
                            tvb_ip_to_str(tvb, offset2));
        break;
    }

    case 2: {
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 2 - IPv6");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
                            "Notify node address: %s",
                            tvb_ip6_to_str(tvb, offset2));
        proto_item_append_text(ti, ": Notify node: %s",
                               tvb_ip6_to_str(tvb, offset2));
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * GENERALIZED UNI
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_gen_uni(proto_tree *ti, proto_tree *rsvp_object_tree,
                     tvbuff_t *tvb,
                     int offset, int obj_length,
                     int rsvp_class _U_, int type,
                     rsvp_conversation_info *rsvph)
{
    int         offset2 = offset + 4;
    int         mylen, i, j, k, l, m;
    proto_item *ti2;
    proto_tree *rsvp_gen_uni_subtree, *rsvp_session_subtree, *rsvp_template_subtree;
    int         s_len, s_class, s_type, sobj_len, nsap_len;
    int         offset3;

    proto_item_set_text(ti, "GENERALIZED UNI: ");

    mylen = obj_length - 4;
    switch(type) {
    case 1: {
        const char *c;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        for (i=1, l = 0; l < mylen; i++) {
            sobj_len = tvb_get_ntohs(tvb, offset2+l);
            j = tvb_get_guint8(tvb, offset2+l+2);
            switch(j) {
            case 1:
            case 2: /* We do source and destination TNA together */
                c = (j==1) ? "Source" : "Destination";
                k = tvb_get_guint8(tvb, offset2+l+3);
                switch(k) {
                case 1:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, 8,
                                              "%s IPv4 TNA: %s", c,
                                              tvb_ip_to_str(tvb, offset2+l+4));
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (%s)", j, c);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: 1 (IPv4)");
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    if (j==1)
                      proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
                                          tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
                    else
                      proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
                                          tvb, offset2+l+4, 4, ENC_BIG_ENDIAN);
                    if (i < 4) {
                        proto_item_append_text(ti, "%s IPv4 TNA: %s", c,
                                               tvb_ip_to_str(tvb, offset2+l+4));
                    }
                    break;

                case 2:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, 20,
                                              "%s IPv6 TNA:", c);
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (%s)", j, c);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: 2 (IPv6)");
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    if (j==1)
                      proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
                                          tvb, offset2+l+4, 16, ENC_NA);
                    else
                      proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
                                          tvb, offset2+l+4, 16, ENC_NA);
                    if (i < 4) {
                        proto_item_append_text(ti, "%s IPv6 TNA: %s", c,
                                               tvb_ip6_to_str(tvb, offset2+l+4));
                    }
                    break;

                case 3:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, tvb_get_ntohs(tvb, offset2+l),
                                              "%s NSAP TNA: ", c);
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    nsap_len = tvb_get_guint8(tvb, offset2+l+4);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (%s)", j, c);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: 3 (NSAP)");
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
                                        "NSAP Length: %u", nsap_len);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+5,
                                        sobj_len-4,
                                        "NSAP address: %s",
                                        print_nsap_net(tvb_get_ptr(tvb, offset2+l+5, nsap_len), nsap_len));
                    if (i < 4) {
                        proto_item_append_text(ti, "%s NSAP TNA: %s", c,
                                               print_nsap_net(tvb_get_ptr(tvb, offset2+l+5, nsap_len), nsap_len));
                    }
                    break;

                default:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, tvb_get_ntohs(tvb, offset2+l),
                                              "%s UNKNOWN TNA", c);
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (%s)", j, c);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: %d (UNKNOWN)", j);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4,
                                        sobj_len-4,
                                        "Data");
                    if (i < 4) {
                        proto_item_append_text(ti, "%s UNKNOWN", c);
                    }
                    break;
                }
                break;

            case 3: /* Diversity subobject */
                k = tvb_get_guint8(tvb, offset2+l+3);
                switch(k) {
                default:
                case 1:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, tvb_get_ntohs(tvb, offset2+l),
                                              "Diversity Subobject");
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (Diversity)", j);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: %d", tvb_get_guint8(tvb, offset2+l+3));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    m = tvb_get_guint8(tvb, offset2+l+4) >> 4;
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
                                        "Diversity: %d - %s", m,
                                        val_to_str_const(m, ouni_guni_diversity_str, "Unknown"));
                    s_len = tvb_get_ntohs(tvb, offset2+l+8);
                    s_class = tvb_get_guint8(tvb, offset2+l+10);
                    s_type = tvb_get_guint8(tvb, offset2+l+11);
                    ti2 = proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8,
                                              s_len, "Session");
                    rsvp_session_subtree =
                        proto_item_add_subtree(ti2, TREE(rsvp_class_to_tree_type(s_class)));
                    if (s_len < 4) {
                        proto_tree_add_text(rsvp_object_tree, tvb, offset2+l+8, 2,
                            "Length: %u (bogus, must be >= 4)", s_len);
                        break;
                    }
                    proto_tree_add_text(rsvp_session_subtree, tvb, offset2+l+8, 2,
                                "Length: %u", s_len);
                    proto_tree_add_uint(rsvp_session_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
                                offset2+8+l+10, 1, s_class);
                    dissect_rsvp_session(ti2, rsvp_session_subtree, tvb, offset2+l+8,
                                         s_len, s_class, s_type, rsvph);
                    offset3 = offset2 + s_len;
                    s_len = tvb_get_ntohs(tvb, offset3+l+8);
                    s_class = tvb_get_guint8(tvb, offset3+l+10);
                    s_type = tvb_get_guint8(tvb, offset3+l+11);
                    ti2 = proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset3+l+8,
                                              s_len, "Template");
                    rsvp_template_subtree =
                        proto_item_add_subtree(ti2, TREE(rsvp_class_to_tree_type(s_class)));
                    if (s_len < 4) {
                        proto_tree_add_text(rsvp_object_tree, tvb, offset3+l+8, 2,
                            "Length: %u (bogus, must be >= 4)", s_len);
                        break;
                    }
                    proto_tree_add_text(rsvp_template_subtree, tvb, offset3+l+8, 2,
                                "Length: %u", s_len);
                    proto_tree_add_uint(rsvp_template_subtree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
                                offset3+8+l+10, 1, s_class);
                    dissect_rsvp_template_filter(ti2, rsvp_template_subtree, tvb, offset3+l+8,
                                                 s_len, s_class, s_type, rsvph);

                    if (i < 4) {
                        proto_item_append_text(ti, "Diversity");
                    }
                    break;

                }
                break;

            case 4: /* Egress Label */
                k = tvb_get_guint8(tvb, offset2+l+3);
                if (k == 1)             /* Egress label sub-type */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, sobj_len,
                                              "Egress Label Subobject");
                else if (k == 2)        /* SPC_label sub-type (see G.7713.2) */
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, sobj_len,
                                              "SPC Label Subobject");
                else
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, sobj_len,
                                              "Unknown Label Subobject");
                rsvp_gen_uni_subtree = proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                    "Class: %d (Egress/SPC Label)", j);
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                    "Type: %d", k);
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                    "Length: %u", sobj_len);
                proto_tree_add_item(rsvp_gen_uni_subtree, hf_rsvp_gen_uni_direction,
                             tvb, offset+l+2, 1, ENC_BIG_ENDIAN);
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+7, 1,
                                    "Label type: %u", tvb_get_guint8(tvb, offset2+l+7));
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+8, 4,
                                    "Logical Port ID: %u", tvb_get_ntohl(tvb, offset2+l+8));
                proto_item_append_text(ti2, ": %s, Label type %d, Port ID %d, Label ",
                                       tvb_get_guint8(tvb, offset2+l+4) & 0x80 ?
                                       "Upstream" : "Downstream",
                                       tvb_get_guint8(tvb, offset2+l+7),
                                       tvb_get_ntohl(tvb, offset2+l+8));
                for (j=12; j < sobj_len; j+=4) {
                        proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+j, 4,
                                            "Label: %u", tvb_get_ntohl(tvb, offset2+l+j));
                        proto_item_append_text(ti2, "%u ", tvb_get_ntohl(tvb, offset2+l+j));
                }
                if (i < 4) {
                        if (k == 1)
                            proto_item_append_text(ti, "Egress Label");
                        else if (k == 2)
                            proto_item_append_text(ti, "SPC Label");
                }
                break;

            case 5: /* Service Level */
                k = tvb_get_guint8(tvb, offset2+l+3);
                switch(k) {
                default:
                case 1:
                    ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                              offset2+l, sobj_len,
                                              "Service Level Subobject");
                    rsvp_gen_uni_subtree =
                        proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
                                        "Class: %d (Service Level)", j);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+3, 1,
                                        "Type: %d", tvb_get_guint8(tvb, offset2+l+3));
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 2,
                                        "Length: %u", sobj_len);
                    proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+4, 1,
                                        "Service Level: %u", tvb_get_guint8(tvb, offset2+l+4));
                    proto_item_append_text(ti2, ": %u", tvb_get_guint8(tvb, offset2+l+4));
                    if (i < 4) {
                        proto_item_append_text(ti, "Service Level %d", tvb_get_guint8(tvb, offset2+l+4));
                    }
                    break;
                }
                break;

            default: /* Unknown subobject */
                ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
                                          offset2+l, sobj_len,
                                          "Unknown subobject: %u",
                                          j);
                rsvp_gen_uni_subtree =
                    proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l, 1,
                                    "Type: %u (Unknown)", j);
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+1, 1,
                                    "Length: %u",
                                    tvb_get_guint8(tvb, offset2+l+1));
                break;
            }

            if (tvb_get_guint8(tvb, offset2+l+1) < 1) {
                proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+1, 1,
                    "Invalid length: %u", tvb_get_guint8(tvb, offset2+l+1));
                return;
            }
            l += tvb_get_guint8(tvb, offset2+l+1);
            if (l < mylen) {
                if (i < 4)
                    proto_item_append_text(ti, ", ");
                else if (i==4)
                    proto_item_append_text(ti, "...");
            }
        }
        break;
    }

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, mylen,
                            "Data (%d bytes)", mylen);
        break;
    }
}

/*------------------------------------------------------------------------------
 * CALL_ID
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_call_id(proto_tree *ti, proto_tree *rsvp_object_tree,
                     tvbuff_t *tvb,
                     int offset, int obj_length,
                     int rsvp_class _U_, int c_type)
{
    int         type    = 0;
    const char *str;
    int         offset2 = offset + 4;
    int         offset3, offset4, len;

    static const value_string address_type_vals[] = {
        { 1, "1 (IPv4)"},
        { 2, "2 (IPv6)"},
        { 3, "3 (NSAP)"},
        { 4, "4 (MAC)"},
        { 0x7f, "0x7f (Vendor-defined)"},
        { 0, NULL}
    };
    static value_string_ext address_type_vals_ext = VALUE_STRING_EXT_INIT(address_type_vals);

    proto_item_set_text(ti, "CALL-ID: ");
    switch(c_type) {
    case 0:
        proto_item_append_text(ti,"Empty");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Empty (%u)", c_type);
        if (obj_length > 4)
          proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
                              "Data (%d bytes)", obj_length-4);
        break;
    case 1:
    case 2:
        type = tvb_get_guint8 (tvb, offset2);
        if (c_type == 1) {
            offset3 = offset2 + 4;
            len = obj_length - 16;
            proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                                "C-type: 1 (operator specific)");
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
                                val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
            proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 3, "Reserved: %u",
                                tvb_get_ntoh24(tvb, offset2+1));
            proto_item_append_text(ti, "Operator-Specific. Addr Type: %s. ",
                                   val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
        }
        else {
            offset3 = offset2 + 16;
            len = obj_length - 28;
            proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                                "C-type: 2 (globally unique)");
            proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
                                val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"));
            str = tvb_get_string (wmem_packet_scope(), tvb, offset2 + 1, 3);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 1, 3,
                                "International Segment: %s", str);
            proto_item_append_text(ti, "Globally-Unique. Addr Type: %s. Intl Segment: %s. ",
                                   val_to_str_ext(type, &address_type_vals_ext, "Unknown (%u)"), str);
            str = tvb_get_string (wmem_packet_scope(), tvb, offset2 + 4, 12);
            proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 12,
                                "National Segment: %s", str);
            proto_item_append_text(ti, "Natl Segment: %s. ", str);
        }

        switch(type) {
        case 1:
            offset4 = offset3 + 4;
            str = tvb_ip_to_str(tvb, offset3);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
                                tvb, offset3, 4, ENC_BIG_ENDIAN);
            break;

        case 2:
            offset4 = offset3 + 16;
            str = tvb_ip6_to_str(tvb, offset3);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
                                tvb, offset3, 16, ENC_NA);
            break;

        case 3:
            offset4 = offset3 + 20;
            str = print_nsap_net(tvb_get_ptr(tvb, offset3, 20), 20);
            proto_tree_add_text(rsvp_object_tree, tvb, offset3, 20,
                                "Source Transport Network addr: %s", str);
            break;

        case 4:
            offset4 = offset3 + 6;
            str = tvb_ether_to_str(tvb, offset3);
            proto_tree_add_text(rsvp_object_tree, tvb, offset3, 6,
                                "Source Transport Network addr: %s", str);
            break;

        case 0x7F:
            offset4 = offset3 + len;
            str = tvb_bytes_to_ep_str(tvb, offset3, len);
            proto_tree_add_text(rsvp_object_tree, tvb, offset3, len,
                                "Source Transport Network addr: %s", str);
            break;

        default:
            offset4 = offset3 + len;
            str = "???";
            proto_tree_add_text(rsvp_object_tree, tvb, offset3, len, "Unknown Transport Network type: %d",
                                type);
            break;
        }

        proto_item_append_text(ti, "Src: %s. ", str);
        proto_tree_add_text(rsvp_object_tree, tvb, offset4, 8, "Local Identifier: %s",
                            tvb_bytes_to_ep_str(tvb, offset4, 8));
        proto_item_append_text(ti, "Local ID: %s. ", tvb_bytes_to_ep_str(tvb, offset4, 8));
        break;

    default:
        proto_item_append_text(ti, " Unknown");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)", c_type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length-4,
                            "Data (%d bytes)", obj_length-4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * 3GPP2_OBJECT X.S0057-0 v1.0, X.S0011-004-E v1.0
 *------------------------------------------------------------------------------*/
static const value_string rsvp_3gpp_object_ie_type_vals[] = {
    { 0, "TFT IPv4"},
    { 1, "TFT IPv4 Error"},
    { 2, "TFT IPv6"},
    { 3, "TFT IPv6 Error"},
    { 4, "Header Removal"},
    { 5, "Header Removal Error"},
    { 6, "Channel Treatment"},
    { 7, "Channel Treatment Error"},
    { 0, NULL}
};

static const value_string rsvp_3gpp_object_tft_d_vals[] = {
    { 0, "Forward Direction"},
    { 1, "Reverse Direction"},
    { 2, "Reserved"},
    { 3, "Reserved"},
    { 0, NULL}
};

static const value_string rsvp_3gpp_obj_tft_opcode_vals[] = {
    { 0x00, "Spare"},
    { 0x01, "Create new TFT"},
    { 0x02, "Delete existing TFT"},
    { 0x03, "Add packet filters to existing TFT"},
    { 0x04, "Replace packet filters in existing TFT"},
    { 0x05, "Delete packet filters from existing TFT"},
    { 0x06, "QoS Check"},
    { 0x07, "Reserved"},
    { 0x80, "Initiate Flow Request"},
    { 0x81, "QoS Check Confirm"},
    { 0x82, "Initiate Delete Packet Filter from Existing TFT"},
    { 0x83, "Initiate Replace packet filters in existing TFT"},
    { 0, NULL}
};

static const value_string rsvp_3gpp_obj_pf_comp_type_id_vals[] = {
    { 16,  "IPv4 Source Address with Subnet Mask"},
    { 17,  "IPv4 Destination Address with Subnet Mask"},
    { 32,  "IPv6 Source Address with Prefix Length"},
    { 33,  "IPv6 Destination Address with Prefix Length"},
    { 48,  "Protocol /Next header"},
    { 64,  "Single Destination Port"},
    { 65,  "Destination Port range"},
    { 80,  "Single Source Port"},
    { 81,  "Source Port range"},
    { 96,  "Security Parameter Index"},
    { 112, "Type of Service/Traffic Class"},
    { 128, "Flow label"},
    { 129, "Type 2 Routing Header with Prefix Length"},
    { 130, "Home Address Option with Prefix Length"},
    { 0, NULL}
};

static const value_string rsvp_3gpp_obj_pf_treatment_vals[] = {
    { 0, "Header Compression"},
    { 1, "Maximum Buffer Timer"},
    { 0, NULL}
};

#if 0
static const value_string rsvp_3gpp_qos_result_vals[] = {
    { 0, "Successful"},
    { 1, "UE Initiated QoS is not authorized"},
    { 2, "NW initiated QoS in progress for this flow"},
    { 3, "Requested FlowProfileIDs failed mapping"},
    { 0, NULL}
};
#endif

static const value_string rsvp_3gpp_obj_traffic_class_vals[] = {
    { 0, "Unknown"},
    { 1, "Conversational"},
    { 2, "Streaming"},
    { 3, "Interactive"},
    { 4, "Backgroud"},
    { 0, NULL}
};

static void
dissect_rsvp_3gpp_object(proto_tree *ti _U_, proto_tree *rsvp_object_tree,
    tvbuff_t *tvb,
    int offset, int obj_length,
    int rsvp_class _U_, int c_type)
{
    guint16 length, ie_type;

    offset+=3;
    proto_tree_add_item(rsvp_object_tree, hf_rsvp_c_type, tvb, offset, 1, ENC_BIG_ENDIAN);
    offset++;
    /* Set obj_length to the remaining bytes */
    obj_length = obj_length - 4;
    if(c_type==1){
        /* Transaction ID */
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tid, tvb, offset, 4, ENC_BIG_ENDIAN);
        offset+=4;
        obj_length = obj_length - 4;
        /* IE List */
        while(obj_length>0){
            length = tvb_get_ntohs(tvb, offset);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_len, tvb, offset, 2, ENC_BIG_ENDIAN);
            offset+=2;
            ie_type = tvb_get_ntohs(tvb, offset);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ie_type, tvb, offset, 2, ENC_BIG_ENDIAN);
            offset+=2;

            if ((ie_type == 0)||(ie_type==2)){
                guint8 tft_opcode, tft_n_pkt_flt;
                int i;

                if(ie_type == 0){
                    /*IPv4*/
                    proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ue_ipv4_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
                    offset+=4;
                }else{
                    proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_ue_ipv6_addr, tvb, offset, 16, ENC_BIG_ENDIAN);
                    offset+=16;
                }
                /* D Reserved NS SR_ID Reserved P TFT Operation Code Number of Packet filters */
                /* D */
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_d, tvb, offset, 4, ENC_BIG_ENDIAN);
                /* NS */
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_ns, tvb, offset, 4, ENC_BIG_ENDIAN);
                /* SR_ID */
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_sr_id, tvb, offset, 4, ENC_BIG_ENDIAN);
                /* P */
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_p, tvb, offset, 4, ENC_BIG_ENDIAN);
                /* TFT Operation Code */
                tft_opcode = tvb_get_guint8(tvb, offset+2);
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_opcode, tvb, offset, 4, ENC_BIG_ENDIAN);
                /* Number of Packet filters */
                tft_n_pkt_flt = tvb_get_guint8(tvb, offset+3);
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_n_pkt_flt, tvb, offset, 4, ENC_BIG_ENDIAN);
                offset+=4;
                /* Packet filter list
                * The packet filter list contains a variable number of packet filters. It shall be
                * encoded same as defined in X.S0011-D Chapter 4 [5] except as defined
                * below:
                * For "QoS Check Confirm" operations, the packet filter list shall be empty.
                * For "Initiate Delete Packet Filter from Existing TFT", the packet filter list
                * shall contain a variable number of Flow Identifiers given in the number of
                * packet filters field. In this case, the packet filter evaluation precedence,
                * length, and contents are not included, only the Flow Identifiers are
                * included. See Figure B-6, X.S0011-D [5] .
                * For "Initiate Flow request" and "Initiate Replace Packet Filters in Existing
                * TFT" Replace Packet Filters in Existing TFT the packet filter list shall
                * contain a variable number of Flow Identifiers, along with the packet filter
                * contents. See Figure B-7, X.S0011-D
                */
                if((tft_opcode!=0x81)&&(tft_n_pkt_flt != 0)){
                    /* Packet Filter List */
                    for (i = 0; i < tft_n_pkt_flt; i++) {
                        proto_tree   *flow_tree, *t2_tree;
                        guint16 pkt_flt_len, item_len, pf_cont_len;
                        guint8 pf_comp_type_id;

                        ti = proto_tree_add_text(rsvp_object_tree, tvb, offset, -1, "Flow Identifier Num %u",i+1);
                        flow_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_FLOW]);
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN);
                        offset++;
                        item_len = 1;
                        if((tft_opcode==0x05)||(tft_opcode==0x82)){
                            /* delete packet filters from existing TFT, Initiate Delete Packet Filter from Existing TFT */
                            proto_item_set_len(ti, item_len);
                            continue;
                        }
                        /* Packet filter evaluation precedence */
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ev_prec, tvb, offset, 1, ENC_BIG_ENDIAN);
                        offset++;
                        /* Packet filter length */
                        pkt_flt_len = tvb_get_ntohs(tvb,offset);
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_len, tvb, offset, 2, ENC_BIG_ENDIAN);
                        item_len = item_len + pkt_flt_len +1;
                        offset+=2;
                        /* Packet filter contents */
                        /* PF Type (0-1) */
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_type, tvb, offset, 1, ENC_BIG_ENDIAN);
                        offset++;
                        /* Length */
                        pf_cont_len = tvb_get_guint8(tvb, offset);
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_cont_len, tvb, offset, 1, ENC_BIG_ENDIAN);
                        offset++;
                        /* Packet filter component type identifier */
                        pf_comp_type_id = tvb_get_guint8(tvb, offset);
                        proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_comp_type_id, tvb, offset, 1, ENC_BIG_ENDIAN);
                        offset++;
                        /* Packet filter component */
                        switch(pf_comp_type_id){
                        case 16: /* IPv4 Source Address with Subnet Mask */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_src_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                            pf_cont_len-=11;
                            break;
                        case 17: /* IPv4 Destination Address with Subnet Mask */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv4_mask, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                            /* Items length (8 + 3)*/
                            pf_cont_len-=11;
                            break;
                        case 32: /* IPv6 Source Address with Prefix Length */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_src_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
                            offset+=16;
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (17 + 3)*/
                            pf_cont_len-=20;
                            break;
                        case 33: /* IPv6 Destination Address with Prefix Length */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
                            offset+=16;
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (17 + 3)*/
                            pf_cont_len-=20;
                            break;
                        case 48: /* Protocol /Next header */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_prot_next, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (1 + 3)*/
                            pf_cont_len-=4;
                            break;
                        case 64: /* Single Destination Port */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
                            offset+=2;
                            /* Items length (2 + 3)*/
                            pf_cont_len-=5;
                            break;
                        case 65: /* Destination Port range */
                            proto_tree_add_text(rsvp_object_tree, tvb, offset, 4, "Destination Port range %u-%u",
                                tvb_get_ntohs(tvb,offset), tvb_get_ntohs(tvb,offset+2));
                            offset+=4;
                            break;
                        case 80: /* Single Source Port */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
                            offset+=2;
                            /* Items length (2 + 3)*/
                            pf_cont_len-=5;
                            break;
                        case 81: /* Source Port range */
                            proto_tree_add_text(rsvp_object_tree, tvb, offset, 4, "Source Port range %u-%u",
                                tvb_get_ntohs(tvb,offset), tvb_get_ntohs(tvb,offset+2));
                            offset+=4;
                            /* Items length (4 + 3)*/
                            pf_cont_len-=7;
                            break;
                        case 96: /* Security Parameter Index */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_ipsec_spi, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                            /* Items length (4 + 3)*/
                            pf_cont_len-=7;
                            break;
                        case 112: /* Type of Service/Traffic Class */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_tos_tc, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (1 + 3)*/
                            pf_cont_len-=4;
                            break;
                        case 128: /* Flow label */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_flow_lbl, tvb, offset, 3, ENC_BIG_ENDIAN);
                            offset+=3;
                            /* Items length (3 + 3)*/
                            pf_cont_len-=6;
                            break;
                        case 129: /* Type 2 Routing Header with Prefix Length */
                            ti = proto_tree_add_text(flow_tree, tvb, offset, 17, "Type 2 Routing Header packet filter");
                            t2_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_T2]);
                            proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
                            offset+=16;
                            proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (17 + 3)*/
                            pf_cont_len-=20;
                            break;
                        case 130: /* Home Address Option with Prefix Length */
                            ti = proto_tree_add_text(flow_tree, tvb, offset, 17, "Home address Option packet filter");
                            t2_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_HO]);
                            proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6, tvb, offset, 16, ENC_BIG_ENDIAN);
                            offset+=16;
                            proto_tree_add_item(t2_tree, hf_rsvp_3gpp_obj_pf_ipv6_prefix_length, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* Items length (17 + 3)*/
                            pf_cont_len-=20;
                            break;

                        default:
                            proto_tree_add_text(flow_tree, tvb, offset, pf_cont_len-2, "Not dissected Packet filter component");
                            offset = offset + pkt_flt_len - 5;
                            pf_cont_len=0;
                            break;
                        }
                        if(pf_cont_len != 0){
                            /* Packet filter treatment */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_treatment, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            /* [RFC 3006] hint */
                            proto_tree_add_item(flow_tree, hf_rsvp_3gpp_obj_pf_hint, tvb, offset, 4, ENC_BIG_ENDIAN);
                            offset+=4;
                        }
                        proto_item_set_len(ti, item_len);
                    }
                }
                /* QoS List (QoS Check, QoS-Check Confirm  Initiate Flow Request
                * and Initiate Replace Packet Filters in Existing TFT)
                * XXX
                * Create new TFT?
                */
                if((tft_opcode ==  0x01)||(tft_opcode ==  0x06)||(tft_opcode == 0x80)||(tft_opcode == 0x81)||(tft_opcode == 0x83)){
                    /* QoS List Length */
                    gint32 tft_qos_list_len;
                    guint8 blob_len, item_len, padding_len;
                    gboolean verbose;
                    proto_tree   *qos_tree, *qos_sub_blob_tree, *qos_att_tree;
                    int num = 0, j, num_qos_att_set;

                    tft_qos_list_len = tvb_get_ntohs(tvb, offset);
                    proto_tree_add_item(rsvp_object_tree, hf_rsvp_3gpp_obj_tft_qos_list_len, tvb, offset, 2, ENC_BIG_ENDIAN);
                    offset+=2;
                    tft_qos_list_len-=2;
                    if(tft_qos_list_len > 0){
                        while (tft_qos_list_len>0) {
                            int bit_offset; /* offset in bits */
                            guint8 qos_attribute_set_len;

                            num++;

                            ti = proto_tree_add_text(rsvp_object_tree, tvb, offset, -1, "QOS Flow Identifier Num %u", num);
                            qos_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_QOS]);

                            /* Flow Identifier */
                            proto_tree_add_item(qos_tree, hf_rsvp_3gpp_obj_flow_id, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            tft_qos_list_len--;

                            /* R_QOS_SUB_BLOB_LEN 1 */
                            blob_len = tvb_get_guint8(tvb, offset);
                            proto_tree_add_item(qos_tree, hf_rsvp_3gpp_r_qos_blob_len, tvb, offset, 1, ENC_BIG_ENDIAN);
                            offset++;
                            tft_qos_list_len--;

                            /* R_QoS_SUB_BLOB X.S0011-004-D */
                            ti = proto_tree_add_item(qos_tree, hf_rsvp_3gpp_r_qos_blob, tvb, offset, blob_len, ENC_BIG_ENDIAN);
                            qos_sub_blob_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_QOS_SUB_BLOB]);

                            proto_tree_add_item(qos_sub_blob_tree, hf_rsvp_3gpp_r_qos_blob_flow_pri, tvb, offset, 1, ENC_BIG_ENDIAN);
                            proto_tree_add_item(qos_sub_blob_tree, hf_rsvp_3gpp_r_qos_blob_num_qos_att_set, tvb, offset, 1, ENC_BIG_ENDIAN);
                            num_qos_att_set = (tvb_get_guint8(tvb, offset) & 0x0e)>>1;
                            /* point to the first bit in the QoS_ATTRIBUTE_SET */
                            bit_offset = (offset<<3)+7;
                            for (j = 0; j < num_qos_att_set; j++) {
                                qos_attribute_set_len = tvb_get_bits8(tvb,bit_offset,4);
                                ti = proto_tree_add_text(qos_sub_blob_tree, tvb, bit_offset>>3, qos_attribute_set_len, "QoS_ATTRIBUTE_SET %u(%u bytes)",
                                    j+1,
                                    qos_attribute_set_len);
                                qos_att_tree = proto_item_add_subtree(ti, ett_treelist[TT_3GPP_OBJ_QOS_SUB_BLOB]);
                                proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_att_set_len, tvb, bit_offset, 4, ENC_BIG_ENDIAN);
                                bit_offset+=4;

                                if(qos_attribute_set_len==0){
                                    break;
                                }

                                proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_set_id, tvb, bit_offset, 7, ENC_BIG_ENDIAN);
                                bit_offset+=7;

                                verbose = tvb_get_bits8(tvb, bit_offset, 1);
                                proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_verbose, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
                                bit_offset++;


                                if(verbose == FALSE){
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_prof_id, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=16;
                                }else{
                                    /* Traffic_Class 0 or 3 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_traff_cls, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
                                    bit_offset+=3;
                                    /* Peak_Rate 0 or 16 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_peak_rate, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=16;
                                    /* Bucket_Size 0 or 16 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_bucket_size, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=16;
                                    /* Token_Rate 0 or 16 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_token_rate, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=16;
                                    /* Max_Latency 0 or 8 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_max_latency, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=8;
                                    /* Max_Loss_Rate 0 or 8 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_max_loss_rte, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=8;
                                    /* Delay_Var_Sensitive 0 or 1 */
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_delay_var_sensitive, tvb, bit_offset, 16, ENC_BIG_ENDIAN);
                                    bit_offset+=1;
                                }
                                /* Padd to fill up to octet boundary, Reserved 0-7 as needed */
                                padding_len = 0;
                                if((bit_offset & 0x07) != 0){
                                    padding_len = 8 - (bit_offset & 0x07);
                                    proto_tree_add_bits_item(qos_att_tree, hf_rsvp_3gpp_qos_attribute_reserved, tvb, bit_offset, padding_len, ENC_BIG_ENDIAN);
                                }
                                bit_offset = bit_offset + padding_len;
                            }


                            offset = offset + blob_len;
                            tft_qos_list_len = tft_qos_list_len - blob_len;

                            /* Result Code This field is only included in the ResvConf message when
                             * the TFT Operation Code field is set to QoS-Check Confirm.
                             */
                            item_len = blob_len + 2;
                            if(tft_opcode ==  0x81){
                                proto_tree_add_item(qos_tree, hf_rsvp_3gpp_qos_result, tvb, offset, 1, ENC_BIG_ENDIAN);
                                offset++;
                                tft_qos_list_len--;
                                item_len++;
                            }
                            proto_item_set_len(ti, item_len);
                        }
                    }
                }else{
                    proto_tree_add_text(rsvp_object_tree, tvb, offset, length-2, "IE Data");
                }
                obj_length = obj_length - length;
            }
        }
    }
}
/*------------------------------------------------------------------------------
 * RESTART CAPABILITY
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_restart_cap(proto_tree *ti, proto_tree *rsvp_object_tree,
                         tvbuff_t *tvb,
                         int offset, int obj_length,
                         int rsvp_class _U_, int type)
{
    int offset2 = offset + 4;

    proto_item_set_text(ti, "RESTART CAPABILITY: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
                            "Restart Time: %d ms",
                            tvb_get_ntohl(tvb, offset2));
        proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
                            "Recovery Time: %d ms",
                            tvb_get_ntohl(tvb, offset2+4));
        proto_item_append_text(ti, "Restart Time: %d ms. Recovery Time: %d ms.",
                            tvb_get_ntohl(tvb, offset2), tvb_get_ntohl(tvb, offset2+4));
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * PROTECTION INFORMATION
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_protection_info(proto_tree *ti, proto_tree *rsvp_object_tree,
                             tvbuff_t *tvb,
                             int offset, int obj_length,
                             int rsvp_class _U_, int type)
{
    guint8      flags1, lsp_flags, link_flags, seg_flags;
    proto_tree *ti2, *ti3, *ti4, *rsvp_pi_link_flags_tree, *rsvp_pi_lsp_flags_tree, *rsvp_pi_seg_flags_tree;
    int         offset2 = offset + 4;

    proto_item_set_text(ti, "PROTECTION_INFO: ");
    switch(type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: 1");
        flags1 = tvb_get_guint8(tvb, offset2);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_flags_secondary_lsp,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);

        link_flags = tvb_get_guint8(tvb, offset2+3);
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
                                  "Link Flags: 0x%02x", link_flags);
        rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2, TREE(TT_PROTECTION_INFO_LINK));
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra_traffic,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1_1,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated1plus1,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_item_append_text(ti, "%s%s%s%s%s%s%s.",
                               flags1&0x80 ? "SecondaryLSP ":"",
                               link_flags&0x01 ? "ExtraTraffic ":"",
                               link_flags&0x02 ? "Unprotected ":"",
                               link_flags&0x04 ? "Shared ":"",
                               link_flags&0x08 ? "Dedicated1:1 ":"",
                               link_flags&0x10 ? "Dedicated1+1 ":"",
                               link_flags&0x20 ? "Enhanced ":"");
        break;

    case 2:       /* RFC4872 */
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type:2");
        flags1 = tvb_get_guint8(tvb, offset2);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_secondary,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_protecting,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_notification_msg,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_rfc4872_operational,
                             tvb, offset2, 1, ENC_BIG_ENDIAN);

        lsp_flags = tvb_get_guint8(tvb, offset2+1);
        ti3 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
                                  "LSP Flags: 0x%02x -%s%s%s%s%s%s", lsp_flags,
                                  lsp_flags == 0 ? " Unprotected":"",
                                  lsp_flags&0x01 ? " Rerouting":"",
                                  lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
                                  lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
                                  lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
                                  lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
        rsvp_pi_lsp_flags_tree = proto_item_add_subtree(ti3, TREE(TT_PROTECTION_INFO_LSP));
        proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_full_rerouting,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_rerouting_extra,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1_n_protection,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_lsp_flags_tree, hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);

        link_flags = tvb_get_guint8(tvb, offset2+3);
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
                                  "Link Flags: 0x%02x -%s%s%s%s%s%s", link_flags,
                                  link_flags&0x01 ? " ExtraTraffic":"",
                                  link_flags&0x02 ? " Unprotected":"",
                                  link_flags&0x04 ? " Shared":"",
                                  link_flags&0x08 ? " Dedicated1:1":"",
                                  link_flags&0x10 ? " Dedicated1+1":"",
                                  link_flags&0x20 ? " Enhanced":"");
        rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2, TREE(TT_PROTECTION_INFO_LINK));
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_extra,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_unprotected,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_shared,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1_1,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_dedicated_1plus1,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_link_flags_tree, hf_rsvp_pi_link_flags_enhanced,
                             tvb, offset2+3, 1, ENC_BIG_ENDIAN);

        proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_in_place,
                             tvb, offset2+4, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_protection_info_required,
                             tvb, offset2+4, 1, ENC_BIG_ENDIAN);

        seg_flags = tvb_get_guint8(tvb, offset2+5);
        ti4 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 1,
                                 "Segment recovery Flags: 0x%02x - %s%s%s%s%s%s", seg_flags,
                                  seg_flags == 0 ? " Unprotected":"",
                                  seg_flags&0x01 ? " Rerouting":"",
                                  seg_flags&0x02 ? " Rerouting with extra-traffic":"",
                                  seg_flags&0x04 ? " 1:N Protection with extra-traffic":"",
                                  seg_flags&0x08 ? " 1+1 Unidirectional protection":"",
                                  seg_flags&0x10 ? " 1+1 Bidirectional protection":"");
        rsvp_pi_seg_flags_tree = proto_item_add_subtree(ti4, TREE(TT_PROTECTION_INFO_SEG));
        proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_full_rerouting,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_rerouting_extra,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1_n_protection,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_unidirectional,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_pi_seg_flags_tree, hf_rsvp_pi_seg_flags_1plus1_bidirectional,
                             tvb, offset2+1, 1, ENC_BIG_ENDIAN);

        proto_item_append_text(ti, "%s%s%s%s Link:%s%s%s%s%s%s, LSP:%s%s%s%s%s%s.",
                               flags1&0x80 ? "SecondaryLSP ":"",
                               flags1&0x40 ? "ProtectingLSP ":"",
                               flags1&0x20 ? "Notification ":"",
                               flags1&0x10 ? "OperationalLSP ":"",
                               link_flags&0x01 ? " ExtraTraffic":"",
                               link_flags&0x02 ? " Unprotected":"",
                               link_flags&0x04 ? " Shared":"",
                               link_flags&0x08 ? " Dedicated1:1":"",
                               link_flags&0x10 ? " Dedicated1+1":"",
                               link_flags&0x20 ? " Enhanced":"",
                               lsp_flags == 0 ? " Unprotected":"",
                               lsp_flags&0x01 ? " Rerouting":"",
                               lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
                               lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
                               lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
                               lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * FAST REROUTE
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_fast_reroute(proto_tree *ti, proto_tree *rsvp_object_tree,
                          tvbuff_t *tvb,
                          int offset, int obj_length,
                          int rsvp_class _U_, int type)
{
    guint8      flags;
    proto_tree *ti2, *rsvp_frr_flags_tree;

    proto_item_set_text(ti, "FAST_REROUTE: ");
    switch(type) {
    case 1:
    case 7:
        if (((type == 1) && (obj_length != 24)) || ((type == 7) && (obj_length != 20))) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset, obj_length,
                                "<<<Invalid length: cannot decode>>>");
            proto_item_append_text(ti, "Invalid length");
            break;
        }
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: %u", type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
                            "Setup Priority: %d", tvb_get_guint8(tvb, offset+4));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 1,
                            "Hold Priority: %d", tvb_get_guint8(tvb, offset+5));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 1,
                            "Hop Limit: %d", tvb_get_guint8(tvb, offset+6));

        flags = tvb_get_guint8(tvb, offset+7);
        ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1,
                                  "Flags: 0x%02x", flags);
        rsvp_frr_flags_tree = proto_item_add_subtree(ti2, TREE(TT_FAST_REROUTE_FLAGS));
        proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_one2one_backup,
                             tvb, offset+7, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(rsvp_frr_flags_tree, hf_rsvp_frr_flags_facility_backup,
                             tvb, offset+7, 1, ENC_BIG_ENDIAN);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
                            "Bandwidth: %.10g", tvb_get_ntohieee_float(tvb, offset+8));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
                            "Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset+12));
        proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 4,
                            "Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset+16));
        if (type == 1) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
                                "Include-All: 0x%0x", tvb_get_ntohl(tvb, offset+20));
        }

        proto_item_append_text(ti, "%s%s",
                               flags &0x01 ? "One-to-One Backup, " : "",
                               flags &0x02 ? "Facility Backup" : "");
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * DETOUR
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_detour(proto_tree *ti, proto_tree *rsvp_object_tree,
                    tvbuff_t *tvb,
                    int offset, int obj_length,
                    int rsvp_class _U_, int type)
{
    int remaining_length, count;
    int iter;

    proto_item_set_text(ti, "DETOUR: ");
    switch(type) {
    case 7:
        iter = 0;
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: %u", type);
        for (remaining_length = obj_length - 4, count = 1;
             remaining_length > 0; remaining_length -= 8, count++) {
            if (remaining_length < 8) {
                proto_tree_add_text(rsvp_object_tree, tvb, offset+remaining_length,
                                    obj_length-remaining_length,
                                    "<<<Invalid length: cannot decode>>>");
                proto_item_append_text(ti, "Invalid length");
                break;
            }
            iter++;
            proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
                                "PLR ID %d: %s", count,
                                tvb_ip_to_str(tvb, offset+(4*iter)));
            iter++;
            proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
                                "Avoid Node ID %d: %s", count,
                                tvb_ip_to_str(tvb, offset+(4*iter)));
        }
        break;

    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)",
                            type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+4, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * DIFFSERV
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_diffserv(proto_tree *ti, proto_tree *rsvp_object_tree,
                      tvbuff_t *tvb,
                      int offset, int obj_length,
                      int rsvp_class _U_, int type)
{
    int mapnb, count;
    int *hfindexes[] = {
        &hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
        &hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
        &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
        &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
        &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
        &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
        &hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15]
    };
    gint *etts[] = {
        &TREE(TT_DIFFSERV_MAP),
        &TREE(TT_DIFFSERV_MAP_PHBID)
    };

    proto_item_set_text(ti, "DIFFSERV: ");
    offset += 3;
    switch (type) {
    case 1:
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
                            "C-type: 1 - E-LSP");
        proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
                            tvb, offset + 4, 1,
                            mapnb = tvb_get_guint8(tvb, offset + 4) & 15);
        proto_item_append_text(ti, "E-LSP, %u MAP%s", mapnb,
                               (mapnb == 0) ? "" : "s");
        offset += 5;

        for (count = 0; count < mapnb; count++) {
            dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
                                         offset, hfindexes, etts);
            offset += 4;
        }
        break;
    case 2:
        proto_item_append_text(ti, "L-LSP");
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
                            "C-type: 2 - L-LSP");
        dissect_diffserv_mpls_common(tvb, rsvp_object_tree, type,
                                     offset + 3, hfindexes, etts);
        break;
    default:
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 1,
                            "C-type: Unknown (%u)", type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset + 1, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*------------------------------------------------------------------------------
 * CLASSTYPE
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
                               tvbuff_t *tvb,
                               int offset, int obj_length,
                               int rsvp_class _U_, int type)
{
    proto_item *hidden_item;
    int         offset2 = offset + 4;
    guint8      ct      = 0;

    hidden_item = proto_tree_add_item(rsvp_object_tree,
                               hf_rsvp_filter[RSVPF_DSTE],
                               tvb, offset, 8, ENC_NA);
    PROTO_ITEM_SET_HIDDEN(hidden_item);

    switch(type) {
    case 1:
        ct = tvb_get_guint8(tvb, offset2+3);
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: 1");
        proto_tree_add_item(rsvp_object_tree,
                            hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
                            tvb, offset2+3, 1, ENC_BIG_ENDIAN);
        proto_item_set_text(ti, "CLASSTYPE: CT %u", ct);
        break;
    default:
        proto_item_set_text(ti, "CLASSTYPE: (Unknown C-type)");
        proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
                            "C-type: Unknown (%u)", type);
        proto_tree_add_text(rsvp_object_tree, tvb, offset2, obj_length - 4,
                            "Data (%d bytes)", obj_length - 4);
        break;
    }
}

/*----------------------------------------------------------------------------
 * VENDOR PRIVATE USE
 *---------------------------------------------------------------------------*/
static void
dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
                                proto_tree *rsvp_object_tree,
                                tvbuff_t *tvb,
                                int offset, int obj_length,
                                int rsvp_class _U_, int type)
{
    /*
     * FF: from Section 2, RFC 3936
     *
     * "Organization/Vendor Private" ranges refer to values that are
     * enterprise-specific;  these MUST NOT be registered with IANA.  For
     * Vendor Private values, the first 4-octet word of the data field MUST
     * be an enterprise code [ENT: www.iana.org/assignments/enterprise-numbers]
     * (network order) as registered with the IANA SMI Network Management
     * Private Enterprise Codes, and the rest of the data thereafter is for
     * the private use of the registered enterprise.
     */
    proto_item *hidden_item;

    hidden_item = proto_tree_add_item(rsvp_object_tree,
                                      hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
                                      tvb, offset, obj_length, ENC_NA);
    PROTO_ITEM_SET_HIDDEN(hidden_item);
    proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                        "C-type: %u", type);
    proto_tree_add_item(rsvp_object_tree,
                        hf_rsvp_filter[RSVPF_ENT_CODE],
                        tvb, offset + 4, 4, ENC_BIG_ENDIAN);
    proto_tree_add_item(rsvp_object_tree, hf_rsvp_private_data, tvb, offset + 8,
                        obj_length - 8, ENC_NA);
}

/*----------------------------------------------------------------------------
 * JUNIPER PROPRIETARY
 *---------------------------------------------------------------------------*/
static void
dissect_rsvp_juniper(proto_tree *ti _U_,
                                proto_tree *rsvp_object_tree,
                                tvbuff_t *tvb,
                                int offset, int obj_length,
                                int rsvp_class _U_, int type)
{
    /*
     * Juniper proprietary TLVs:
     * According to the tcpdump code, this is of the form:
     * #TLVs (2 bytes)
     * #Padbytes (2 bytes)
     * per TLV:
     *   type (1 byte)
     *   length
     *   value (length-2 bytes)
     * padbytes
     */

    proto_item *hidden_item;

    hidden_item = proto_tree_add_item(rsvp_object_tree,
                                      hf_rsvp_filter[RSVPF_JUNIPER],
                                      tvb, offset, obj_length, ENC_NA);
    PROTO_ITEM_SET_HIDDEN(hidden_item);
    proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                        "C-type: %u", type);
    offset += 4;
    if (type == 1) {
        guint tlvs, pad;
        tlvs = tvb_get_ntohs(tvb, offset);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_numtlvs, tvb,
            offset, 2, ENC_BIG_ENDIAN);
        offset += 2;
        pad = tvb_get_ntohs(tvb, offset);
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_padlength, tvb,
            offset, 2, ENC_BIG_ENDIAN);
        offset += 2;
        while (tlvs > 0) {
            guint8 t, l;
            t = tvb_get_guint8(tvb, offset);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_type, tvb,
                offset, 1, ENC_NA);
            offset += 1;
            l = tvb_get_guint8(tvb, offset);
            proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_length, tvb,
                offset, 1, ENC_NA);
            offset += 1;
            switch (t) {
            case 0x01:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_cos, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            case 0x02:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_metric1, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            case 0x04:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_metric2, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            case 0x08:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_ccc_status, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            case 0x10:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_path, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            default:
                proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_attrib_unknown, tvb,
                    offset, l-2, ENC_NA);
                offset += (l-2);
                break;
            }
            tlvs--;
        }
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_pad, tvb,
                offset, pad, ENC_NA);
    } else if (obj_length > 4) {
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_juniper_unknown, tvb,
                offset, obj_length, ENC_NA);
    }
}

/*----------------------------------------------------------------------------
 * UNKOWN
 *---------------------------------------------------------------------------*/
static void
dissect_rsvp_unknown(proto_tree *ti _U_,
                                proto_tree *rsvp_object_tree,
                                tvbuff_t *tvb,
                                int offset, int obj_length,
                                int rsvp_class _U_, int type)
{
    proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
                        "C-type: %u", type);
    if (obj_length > 4) {
        proto_tree_add_item(rsvp_object_tree, hf_rsvp_unknown_data, tvb, offset + 4,
                        obj_length - 4, ENC_NA);
    }
}


/*------------------------------------------------------------------------------
 * Dissect a single RSVP message in a tree
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                      int tree_mode, rsvp_conversation_info *rsvph, gboolean e2ei)
{
    proto_tree *rsvp_tree;
    proto_tree *rsvp_header_tree;
    proto_tree *rsvp_object_tree;
    proto_tree *ti;
    proto_item *hidden_item;
    guint16     cksum, computed_cksum;
    vec_t       cksum_vec[1];
    int         offset    = 0;
    int         len;
    guint8      ver_flags;
    guint8      message_type;
    int         session_off, tempfilt_off;
    int         msg_length;
    int         obj_length;

    offset       = 0;
    ver_flags    = tvb_get_guint8(tvb, 0);
    msg_length   = tvb_get_ntohs(tvb, 6);
    message_type = tvb_get_guint8(tvb, 1);

    ti = proto_tree_add_item(tree, proto_rsvp, tvb, offset, msg_length,
                             ENC_NA);
    rsvp_tree = proto_item_add_subtree(ti, tree_mode);
    if (e2ei)
        proto_item_append_text(rsvp_tree, " (E2E-IGNORE)");
    proto_item_append_text(rsvp_tree, ": ");
    proto_item_append_text(rsvp_tree, "%s", val_to_str_ext(message_type, &message_type_vals_ext,
                                                 "Unknown (%u). "));
    find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
    if (session_off)
        proto_item_append_text(rsvp_tree, "%s", summary_session(tvb, session_off));
    if (tempfilt_off)
        proto_item_append_text(rsvp_tree, "%s", summary_template(tvb, tempfilt_off));

    ti = proto_tree_add_text(rsvp_tree, tvb, offset, 8, "RSVP Header. %s",
                             val_to_str_ext(message_type, &message_type_vals_ext,
                                        "Unknown Message (%u). "));
    if (e2ei)
        proto_item_append_text(ti, " (E2E-IGNORE)");
    rsvp_header_tree = proto_item_add_subtree(ti, TREE(TT_HDR));

    proto_tree_add_text(rsvp_header_tree, tvb, offset, 1, "RSVP Version: %u",
                        (ver_flags & 0xf0)>>4);
    proto_tree_add_text(rsvp_header_tree, tvb, offset, 1, "Flags: %02x",
                        ver_flags & 0xf);
    proto_tree_add_uint(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG], tvb,
                        offset+1, 1, message_type);
    switch (RSVPF_MSG + message_type) {

    case RSVPF_PATH:
    case RSVPF_RESV:
    case RSVPF_PATHERR:
    case RSVPF_RESVERR:
    case RSVPF_PATHTEAR:
    case RSVPF_RESVTEAR:
    case RSVPF_RCONFIRM:
    case RSVPF_RTEARCONFIRM:
    case RSVPF_BUNDLE:
    case RSVPF_ACK:
    case RSVPF_SREFRESH:
    case RSVPF_HELLO:
    case RSVPF_NOTIFY:
        hidden_item = proto_tree_add_boolean(rsvp_header_tree, hf_rsvp_filter[RSVPF_MSG + message_type], tvb,
                                      offset+1, 1, 1);
        PROTO_ITEM_SET_HIDDEN(hidden_item);
        break;
    }

    cksum = tvb_get_ntohs(tvb, offset+2);
    if (!pinfo->fragmented && ((int) tvb_length(tvb) >= msg_length)) {
        /* The packet isn't part of a fragmented datagram and isn't
           truncated, so we can checksum it. */
        cksum_vec[0].ptr = tvb_get_ptr(tvb, 0, msg_length);
        cksum_vec[0].len = msg_length;
        computed_cksum = in_cksum(&cksum_vec[0], 1);
        if (computed_cksum == 0) {
            proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
                                "Message Checksum: 0x%04x [correct]",
                                cksum);
        } else {
            proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
                                "Message Checksum: 0x%04x [incorrect, should be 0x%04x]",
                                cksum,
                                in_cksum_shouldbe(cksum, computed_cksum));
        }
    } else {
        proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2,
                            "Message Checksum: 0x%04x",
                            cksum);
    }
    proto_tree_add_text(rsvp_header_tree, tvb, offset+4, 1,
                        "Sending TTL: %u",
                        tvb_get_guint8(tvb, offset+4));
    proto_tree_add_text(rsvp_header_tree, tvb, offset+6, 2,
                        "Message length: %u", msg_length);

    offset = 8;
    len    = 8;

    if (message_type == RSVP_MSG_BUNDLE) {
        /* Bundle message. Dissect component messages */
        if (rsvp_bundle_dissect) {
            int len2 = 8;
            while (len2 < msg_length) {
                gint      sub_len;
                tvbuff_t *tvb_sub;
                sub_len = tvb_get_ntohs(tvb, len2+6);
                tvb_sub = tvb_new_subset(tvb, len2, sub_len, sub_len);
                dissect_rsvp_msg_tree(tvb_sub, pinfo, rsvp_tree, TREE(TT_BUNDLE_COMPMSG), rsvph, e2ei);
                len2 += sub_len;
            }
        } else {
            proto_tree_add_text(rsvp_tree, tvb, offset, msg_length - len,
                                "Bundle Component Messages Not Dissected");
        }
        return;
    }

    while (len < msg_length) {
        guint8 rsvp_class;
        guint8 type;

        obj_length = tvb_get_ntohs(tvb, offset);
        rsvp_class = tvb_get_guint8(tvb, offset+2);
        type = tvb_get_guint8(tvb, offset+3);
        ti = proto_tree_add_item(rsvp_tree, hf_rsvp_filter[rsvp_class_to_filter_num(rsvp_class)],
                                 tvb, offset, obj_length, ENC_BIG_ENDIAN);
        rsvp_object_tree = proto_item_add_subtree(ti, TREE(rsvp_class_to_tree_type(rsvp_class)));
        if (obj_length < 4) {
            proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
                                "Length: %u (bogus, must be >= 4)", obj_length);
            break;
        }
        proto_tree_add_text(rsvp_object_tree, tvb, offset, 2,
                            "Length: %u", obj_length);
        proto_tree_add_uint(rsvp_object_tree, hf_rsvp_filter[RSVPF_OBJECT], tvb,
                            offset+2, 1, rsvp_class);

        switch(rsvp_class) {

        case RSVP_CLASS_SESSION:
            dissect_rsvp_session(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
            break;

        case RSVP_CLASS_HOP:
            dissect_rsvp_hop(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_TIME_VALUES:
            dissect_rsvp_time_values(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_ERROR:
            dissect_rsvp_error(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_SCOPE:
            dissect_rsvp_scope(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_STYLE:
            dissect_rsvp_style(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_CONFIRM:
            dissect_rsvp_confirm(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_SENDER_TEMPLATE:
        case RSVP_CLASS_FILTER_SPEC:
            dissect_rsvp_template_filter(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
            break;

        case RSVP_CLASS_SENDER_TSPEC:
            dissect_rsvp_tspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_FLOWSPEC:
            dissect_rsvp_flowspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_ADSPEC:
            dissect_rsvp_adspec(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_INTEGRITY:
            dissect_rsvp_integrity(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_POLICY:
            dissect_rsvp_policy(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_LABEL_REQUEST:
            dissect_rsvp_label_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_RECOVERY_LABEL:
        case RSVP_CLASS_UPSTREAM_LABEL:
        case RSVP_CLASS_SUGGESTED_LABEL:
        case RSVP_CLASS_LABEL:
            dissect_rsvp_label(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_LABEL_SET:
            dissect_rsvp_label_set(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_SESSION_ATTRIBUTE:
            dissect_rsvp_session_attribute(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_EXPLICIT_ROUTE:
            dissect_rsvp_explicit_route(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_RECORD_ROUTE:
            dissect_rsvp_record_route(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_EXCLUDE_ROUTE:
            dissect_rsvp_exclude_route(ti, rsvp_object_tree, tvb, offset,
                                       obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_MESSAGE_ID:
            dissect_rsvp_message_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_MESSAGE_ID_ACK:
            dissect_rsvp_message_id_ack(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_MESSAGE_ID_LIST:
            dissect_rsvp_message_id_list(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_HELLO:
            dissect_rsvp_hello(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_DCLASS:
            dissect_rsvp_dclass(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_ADMIN_STATUS:
            dissect_rsvp_admin_status(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_LSP_ATTRIBUTES:
        case RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES:
            dissect_rsvp_lsp_attributes(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_ASSOCIATION:
            dissect_rsvp_association(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_LSP_TUNNEL_IF_ID:
            dissect_rsvp_lsp_tunnel_if_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_NOTIFY_REQUEST:
            dissect_rsvp_notify_request(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_GENERALIZED_UNI:
            dissect_rsvp_gen_uni(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type, rsvph);
            break;

        case RSVP_CLASS_CALL_ID:
            dissect_rsvp_call_id(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_3GPP2_OBJECT:
            dissect_rsvp_3gpp_object(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_RESTART_CAP:
            dissect_rsvp_restart_cap(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_PROTECTION:
            dissect_rsvp_protection_info(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_FAST_REROUTE:
            dissect_rsvp_fast_reroute(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_DETOUR:
            dissect_rsvp_detour(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_DIFFSERV:
            dissect_rsvp_diffserv(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_CLASSTYPE:
            dissect_rsvp_diffserv_aware_te(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_VENDOR_PRIVATE_1:
        case RSVP_CLASS_VENDOR_PRIVATE_2:
        case RSVP_CLASS_VENDOR_PRIVATE_3:
        case RSVP_CLASS_VENDOR_PRIVATE_4:
        case RSVP_CLASS_VENDOR_PRIVATE_5:
        case RSVP_CLASS_VENDOR_PRIVATE_6:
        case RSVP_CLASS_VENDOR_PRIVATE_7:
        case RSVP_CLASS_VENDOR_PRIVATE_8:
        case RSVP_CLASS_VENDOR_PRIVATE_9:
        case RSVP_CLASS_VENDOR_PRIVATE_10:
        case RSVP_CLASS_VENDOR_PRIVATE_11:
        case RSVP_CLASS_VENDOR_PRIVATE_12:
            dissect_rsvp_vendor_private_use(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;

        case RSVP_CLASS_JUNIPER_PROPERTIES:
            dissect_rsvp_juniper(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;
        case RSVP_CLASS_NULL:
        default:
            dissect_rsvp_unknown(ti, rsvp_object_tree, tvb, offset, obj_length, rsvp_class, type);
            break;
        }

        offset += obj_length;
        len += obj_length;
    }
}

/*------------------------------------------------------------------------------
 * The main loop
 *------------------------------------------------------------------------------*/
static void
dissect_rsvp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean e2ei)
{
    guint8 message_type;
    int    session_off, tempfilt_off;

    rsvp_conversation_info  *rsvph;
    conversation_t          *conversation;
    struct rsvp_request_key  request_key, *new_request_key;
    struct rsvp_request_val *request_val;

    col_clear(pinfo->cinfo, COL_INFO);

    message_type = tvb_get_guint8(tvb, 1);

    rsvph = wmem_new0(wmem_packet_scope(), rsvp_conversation_info);

    /* Copy over the source and destination addresses from the pinfo strucutre */
    SET_ADDRESS(&rsvph->source, pinfo->src.type, pinfo->src.len, pinfo->src.data);
    SET_ADDRESS(&rsvph->destination, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);

    col_add_str(pinfo->cinfo, COL_INFO,
                val_to_str_ext(message_type, &message_type_vals_ext, "Unknown (%u). "));

    if (message_type == RSVP_MSG_BUNDLE) {
        col_set_str(pinfo->cinfo, COL_INFO,
                    rsvp_bundle_dissect ?
                    "Component Messages Dissected" :
                    "Component Messages Not Dissected");
    } else {
        find_rsvp_session_tempfilt(tvb, 0, &session_off, &tempfilt_off);
        if (session_off)
            col_append_str(pinfo->cinfo, COL_INFO, summary_session(tvb, session_off));
        if (tempfilt_off)
            col_append_str(pinfo->cinfo, COL_INFO, summary_template(tvb, tempfilt_off));
    }

    if (tree) {
        dissect_rsvp_msg_tree(tvb, pinfo, tree, TREE(TT_RSVP), rsvph, e2ei);
    }

    /* ACK, SREFRESH and HELLO messages don't have any associated SESSION and,
       therefore, no conversation */
    if ((message_type == RSVP_MSG_ACK)      ||
        (message_type == RSVP_MSG_SREFRESH) ||
        (message_type == RSVP_MSG_HELLO))
      return;

    /* Find out what conversation this packet is part of. */
    conversation = find_or_create_conversation(pinfo);

    /* Now build the request key */
    memset(&request_key, 0, sizeof(request_key));
    request_key.conversation = conversation->index;
    request_key.session_type = rsvph->session_type;

    switch (request_key.session_type) {
    case RSVP_SESSION_TYPE_IPV4:
        SET_ADDRESS(&request_key.u.session_ipv4.destination,
                    rsvph->destination.type, rsvph->destination.len,
                    rsvph->destination.data);
        request_key.u.session_ipv4.protocol = rsvph->protocol;
        request_key.u.session_ipv4.udp_dest_port = rsvph->udp_dest_port;
        break;

    case RSVP_SESSION_TYPE_IPV6:
        /* Not supported yet */
        break;

    case RSVP_SESSION_TYPE_IPV4_LSP:
        SET_ADDRESS(&request_key.u.session_ipv4_lsp.destination,
                    rsvph->destination.type, rsvph->destination.len,
                    rsvph->destination.data);
        request_key.u.session_ipv4_lsp.udp_dest_port = rsvph->udp_dest_port;
        request_key.u.session_ipv4_lsp.ext_tunnel_id = rsvph->ext_tunnel_id;
        break;

    case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
        SET_ADDRESS(&request_key.u.session_agg_ipv4.destination,
                    rsvph->destination.type, rsvph->destination.len,
                    rsvph->destination.data);
        request_key.u.session_agg_ipv4.dscp = rsvph->dscp;
        break;

    case RSVP_SESSION_TYPE_IPV4_UNI:
        SET_ADDRESS(&request_key.u.session_ipv4_uni.destination,
                    rsvph->destination.type, rsvph->destination.len,
                    rsvph->destination.data);
        request_key.u.session_ipv4_uni.udp_dest_port = rsvph->udp_dest_port;
        request_key.u.session_ipv4_uni.ext_tunnel_id = rsvph->ext_tunnel_id;
        break;

    case RSVP_SESSION_TYPE_IPV4_E_NNI:
        SET_ADDRESS(&request_key.u.session_ipv4_enni.destination,
                    rsvph->destination.type, rsvph->destination.len,
                    rsvph->destination.data);
        request_key.u.session_ipv4_enni.udp_dest_port = rsvph->udp_dest_port;
        request_key.u.session_ipv4_enni.ext_tunnel_id = rsvph->ext_tunnel_id;
        break;
    default:
        /* This should never happen. */
        if (tree) {
            proto_tree_add_text(tree, tvb, 0, 0, "Unknown session type");
        }
        break;
    }

    SE_COPY_ADDRESS(&request_key.source_info.source, &rsvph->source);
    request_key.source_info.udp_source_port = rsvph->udp_source_port;

    /* See if a request with this key already exists */
    request_val =
        (struct rsvp_request_val *) g_hash_table_lookup(rsvp_request_hash,
                                                        &request_key);

    /* If not, insert the new request key into the hash table */
    if (!request_val) {
        new_request_key = (struct rsvp_request_key *)wmem_memdup(
              wmem_file_scope(), &request_key, sizeof(struct rsvp_request_key));

        request_val = wmem_new(wmem_file_scope(), struct rsvp_request_val);
        request_val->value = conversation->index;

        g_hash_table_insert(rsvp_request_hash, new_request_key, request_val);
    }

    tap_queue_packet(rsvp_tap, pinfo, rsvph);
}

static int
dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSVP");

    dissect_rsvp_common(tvb, pinfo, tree, FALSE);
    return tvb_length(tvb);
}

static int
dissect_rsvp_e2ei(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSVP-E2EI");

    dissect_rsvp_common(tvb, pinfo, tree, TRUE);
    return tvb_length(tvb);
}

static void
register_rsvp_prefs(void)
{
    module_t *rsvp_module;

    rsvp_module = prefs_register_protocol(proto_rsvp, NULL);
    prefs_register_bool_preference(
        rsvp_module, "process_bundle",
        "Dissect sub-messages in BUNDLE message",
        "Specifies whether Wireshark should decode and display sub-messages within BUNDLE messages",
        &rsvp_bundle_dissect);
    prefs_register_enum_preference(
        rsvp_module, "generalized_label_options",
        "Dissect generalized labels as",
        "Specifies how Wireshark should dissect generalized labels",
        (gint *)&rsvp_generalized_label_option,
        rsvp_generalized_label_options,
        FALSE);
}

void
proto_register_rsvp(void)
{
    gint i;

    static hf_register_info rsvpf_info[] = {

        /* Message type number */
        {&hf_rsvp_filter[RSVPF_MSG],
         { "Message Type", "rsvp.msg",
           FT_UINT8, BASE_DEC | BASE_EXT_STRING, &message_type_vals_ext, 0x0,
           NULL, HFILL }
        },

        /* Message type shorthands */
        {&hf_rsvp_filter[RSVPF_PATH],
         { "Path Message", "rsvp.path",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RESV],
         { "Resv Message", "rsvp.resv",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_PATHERR],
         { "Path Error Message", "rsvp.perr",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RESVERR],
         { "Resv Error Message", "rsvp.rerr",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_PATHTEAR],
         { "Path Tear Message", "rsvp.ptear",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RESVTEAR],
         { "Resv Tear Message", "rsvp.rtear",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RCONFIRM],
         { "Resv Confirm Message", "rsvp.resvconf",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RTEARCONFIRM],
         { "Resv Tear Confirm Message", "rsvp.rtearconf",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_BUNDLE],
         { "Bundle Message", "rsvp.bundle",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ACK],
         { "Ack Message", "rsvp.ack",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SREFRESH],
         { "Srefresh Message", "rsvp.srefresh",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_HELLO],
         { "HELLO Message", "rsvp.hello",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        /* Object class */
        {&hf_rsvp_filter[RSVPF_OBJECT],
         { "Object class", "rsvp.object",
           FT_UINT8, BASE_DEC | BASE_EXT_STRING, &rsvp_class_vals_ext, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_NOTIFY],
         { "Notify Message", "rsvp.notify",
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        /* Object present shorthands */
        {&hf_rsvp_filter[RSVPF_SESSION],
         { "SESSION", "rsvp.session",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_HOP],
         { "HOP", "rsvp.hop",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_HELLO_OBJ],
         { "HELLO Request/Ack", "rsvp.hello_obj",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_INTEGRITY],
         { "INTEGRITY", "rsvp.integrity",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_TIME_VALUES],
         { "TIME VALUES", "rsvp.time",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ERROR],
         { "ERROR", "rsvp.error",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SCOPE],
         { "SCOPE", "rsvp.scope",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_STYLE],
         { "STYLE", "rsvp.style",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_FLOWSPEC],
         { "FLOWSPEC", "rsvp.flowspec",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_FILTER_SPEC],
         { "FILTERSPEC", "rsvp.filter",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SENDER],
         { "SENDER TEMPLATE", "rsvp.sender",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_TSPEC],
         { "SENDER TSPEC", "rsvp.tspec",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADSPEC],
         { "ADSPEC", "rsvp.adspec",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_POLICY],
         { "POLICY", "rsvp.policy",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_CONFIRM],
         { "CONFIRM", "rsvp.confirm",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_LABEL],
         { "LABEL", "rsvp.label",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RECOVERY_LABEL],
         { "RECOVERY LABEL", "rsvp.recovery_label",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_UPSTREAM_LABEL],
         { "UPSTREAM LABEL", "rsvp.upstream_label",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SUGGESTED_LABEL],
         { "SUGGESTED LABEL", "rsvp.suggested_label",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_LABEL_SET],
         { "LABEL SET", "rsvp.label_set",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ACCEPTABLE_LABEL_SET],
         { "ACCEPTABLE LABEL SET", "rsvp.acceptable_label_set",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_PROTECTION],
         { "PROTECTION", "rsvp.protection",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV],
         { "DIFFSERV", "rsvp.diffserv",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DSTE],
         { "CLASSTYPE", "rsvp.dste",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RESTART_CAP],
         { "RESTART CAPABILITY", "rsvp.restart",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_LABEL_REQUEST],
         { "LABEL REQUEST", "rsvp.label_request",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SESSION_ATTRIBUTE],
         { "SESSION ATTRIBUTE", "rsvp.session_attribute",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_EXPLICIT_ROUTE],
         { "EXPLICIT ROUTE", "rsvp.explicit_route",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_RECORD_ROUTE],
         { "RECORD ROUTE", "rsvp.record_route",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_MESSAGE_ID],
         { "MESSAGE-ID", "rsvp.msgid",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_MESSAGE_ID_ACK],
         { "MESSAGE-ID ACK", "rsvp.msgid_ack",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_MESSAGE_ID_LIST],
         { "MESSAGE-ID LIST", "rsvp.msgid_list",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DCLASS],
         { "DCLASS", "rsvp.dclass",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_LSP_TUNNEL_IF_ID],
         { "LSP INTERFACE-ID", "rsvp.lsp_tunnel_if_id",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS],
         { "ADMIN STATUS", "rsvp.admin_status",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
         { "Reflect", "rsvp.admin_status.reflect",
           FT_BOOLEAN, 32, NULL, 0x80000000,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
         { "Handover", "rsvp.admin_status.handover",
           FT_BOOLEAN, 32, NULL, 0x40,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
         { "Lockout", "rsvp.admin_status.lockout",
           FT_BOOLEAN, 32, NULL, 0x20,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
         { "Inhibit Alarm Communication", "rsvp.admin_status.inhibit",
           FT_BOOLEAN, 32, NULL, 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
         { "Call Management", "rsvp.admin_status.callmgmt",
           FT_BOOLEAN, 32, NULL, 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
         { "Testing", "rsvp.admin_status.testing",
           FT_BOOLEAN, 32, NULL, 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
         { "Administratively down", "rsvp.admin_status.down",
           FT_BOOLEAN, 32, NULL, 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
         { "Delete in progress", "rsvp.admin_status.delete",
           FT_BOOLEAN, 32, NULL, 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_LSP_ATTRIBUTES],
         { "LSP ATTRIBUTES", "rsvp.lsp_attributes",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_ASSOCIATION],
         { "ASSOCIATION", "rsvp.association",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_NOTIFY_REQUEST],
         { "NOTIFY REQUEST", "rsvp.notify_request",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_GENERALIZED_UNI],
         { "GENERALIZED UNI", "rsvp.generalized_uni",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_CALL_ID],
         { "CALL ID", "rsvp.call_id",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_3GPP2_OBJECT],
         { "3GPP2 OBJECT", "rsvp.3gpp2_object",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },
        {&hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
         { "Private object", "rsvp.obj_private",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_UNKNOWN_OBJ],
         { "Unknown object", "rsvp.obj_unknown",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        /* Session fields */
        {&hf_rsvp_filter[RSVPF_SESSION_IP],
         { "Destination address", "rsvp.session.ip",
           FT_IPv4, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SESSION_PORT],
         { "Port number", "rsvp.session.port",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SESSION_PROTO],
         { "Protocol", "rsvp.session.proto",
           FT_UINT8, BASE_DEC, VALS(proto_vals), 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SESSION_TUNNEL_ID],
         { "Tunnel ID", "rsvp.session.tunnel_id",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
         { "Extended tunnel ID", "rsvp.session.ext_tunnel_id",
           FT_UINT32, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_JUNIPER],
         { "Juniper", "rsvp.juniper",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        /* Sender template/Filterspec fields */
        {&hf_rsvp_filter[RSVPF_SENDER_IP],
         { "Sender IPv4 address", "rsvp.sender.ip",
           FT_IPv4, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SENDER_PORT],
         { "Sender port number", "rsvp.sender.port",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_SENDER_LSP_ID],
         { "Sender LSP ID", "rsvp.sender.lsp_id",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        /* Diffserv object fields */
        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAPNB],
         { "MAPnb", "rsvp.diffserv.mapnb",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           MAPNB_DESCRIPTION, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP],
         { "MAP", "rsvp.diffserv.map",
           FT_NONE, BASE_NONE, NULL, 0x0,
           MAP_DESCRIPTION, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_MAP_EXP],
         { "EXP", "rsvp.diffserv.map.exp",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           EXP_DESCRIPTION, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID],
         { PHBID_DESCRIPTION, "rsvp.diffserv.phbid",
           FT_NONE, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_DSCP],
         { PHBID_DSCP_DESCRIPTION, "rsvp.diffserv.phbid.dscp",
           FT_UINT16, BASE_DEC, NULL, PHBID_DSCP_MASK,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_CODE],
         { PHBID_CODE_DESCRIPTION, "rsvp.diffserv.phbid.code",
           FT_UINT16, BASE_DEC, NULL, PHBID_CODE_MASK,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT14],
         { PHBID_BIT14_DESCRIPTION, "rsvp.diffserv.phbid.bit14",
           FT_UINT16, BASE_DEC, VALS(phbid_bit14_vals), PHBID_BIT14_MASK,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_DIFFSERV_PHBID_BIT15],
         { PHBID_BIT15_DESCRIPTION, "rsvp.diffserv.phbid.bit15",
           FT_UINT16, BASE_DEC, VALS(phbid_bit15_vals), PHBID_BIT15_MASK,
           NULL, HFILL }
        },

        /* Diffserv-aware TE object field */
        {&hf_rsvp_filter[RSVPF_DSTE_CLASSTYPE],
         { "CT", "rsvp.dste.classtype",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },

        /* Generalized UNI object field */
        {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV4],
         { "Source TNA", "rsvp.guni.srctna.ipv4",
           FT_IPv4, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV4],
         { "Destination TNA", "rsvp.guni.dsttna.ipv4",
           FT_IPv4, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_GUNI_SRC_IPV6],
         { "Source TNA", "rsvp.guni.srctna.ipv6",
           FT_IPv6, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_GUNI_DST_IPV6],
         { "Destination TNA", "rsvp.guni.dsttna.ipv6",
           FT_IPv6, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        /* Generalized UNI object field */
        {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
         { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv4",
           FT_IPv4, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
         { "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6",
           FT_IPv6, BASE_NONE, NULL, 0x0,
           NULL, HFILL }
        },
        /*
         * FF: Vendor Private object field, please see
         * http://www.iana.org/assignments/enterprise-numbers
         */
        {&hf_rsvp_filter[RSVPF_ENT_CODE],
         { "Enterprise Code", "rsvp.obj_private.enterprise",
           FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
           "IANA Network Management Private Enterprise Code", HFILL }
        },

        {&hf_rsvp_error_flags,
         { "Flags", "rsvp.error_flags",
           FT_UINT8, BASE_HEX, NULL, 0x0,
           NULL, HFILL }
        },

        {&hf_rsvp_error_flags_path_state_removed,
         { "Path State Removed", "rsvp.error_flags.path_state_removed",
           FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_error_flags_not_guilty,
         { "NotGuilty", "rsvp.error_flags.not_guilty",
           FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_error_flags_in_place,
         { "InPlace", "rsvp.error_flags.in_place",
           FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_eth_tspec_tlv_color_mode,
         { "Color Mode (CM)", "rsvp.eth_tspec_tlv.color_mode",
           FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_eth_tspec_tlv_coupling_flag,
         { "Coupling Flag (CF)", "rsvp.eth_tspec_tlv.coupling_flag",
           FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_standard_contiguous_concatenation,
         { "Standard contiguous concatenation", "rsvp.sender_tspec.standard_contiguous_concatenation",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_arbitrary_contiguous_concatenation,
         { "Arbitrary contiguous concatenation", "rsvp.sender_tspec.arbitrary_contiguous_concatenation",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_regenerator_section,
         { "Section/Regenerator Section layer transparency", "rsvp.sender_tspec.regenerator_section",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_multiplex_section,
         { "Line/Multiplex Section layer transparency", "rsvp.sender_tspec.multiplex_section",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_J0_transparency,
         { "J0 transparency", "rsvp.sender_tspec.J0_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_SOH_RSOH_DCC_transparency,
         { "SOH/RSOH DCC transparency", "rsvp.sender_tspec.SOH_RSOH_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_LOH_MSOH_DCC_transparency,
         { "LOH/MSOH DCC transparency", "rsvp.sender_tspec.LOH_MSOH_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_LOH_MSOH_extended_DCC_transparency,
         { "LOH/MSOH Extended DCC transparency", "rsvp.sender_tspec.LOH_MSOH_extended_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_K1_K2_transparency,
         { "K1/K2 transparency", "rsvp.sender_tspec.K1_K2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_E1_transparency,
         { "E1 transparency", "rsvp.sender_tspec.E1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_F1_transparency,
         { "F1 transparency", "rsvp.sender_tspec.F1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_E2_transparency,
         { "E2 transparency", "rsvp.sender_tspec.E2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_B1_transparency,
         { "B1 transparency", "rsvp.sender_tspec.B1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_B2_transparency,
         { "B2 transparency", "rsvp.sender_tspec.B2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_M0_transparency,
         { "M0 transparency", "rsvp.sender_tspec.M0_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
           NULL, HFILL }
        },

        {&hf_rsvp_sender_tspec_M1_transparency,
         { "M1 transparency", "rsvp.sender_tspec.M1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_standard_contiguous_concatenation,
         { "Standard contiguous concatenation", "rsvp.flowspec.standard_contiguous_concatenation",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_arbitrary_contiguous_concatenation,
         { "Arbitrary contiguous concatenation", "rsvp.flowspec.arbitrary_contiguous_concatenation",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_regenerator_section,
         { "Section/Regenerator Section layer transparency", "rsvp.flowspec.regenerator_section",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0001,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_multiplex_section,
         { "Line/Multiplex Section layer transparency", "rsvp.flowspec.multiplex_section",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0002,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_J0_transparency,
         { "J0 transparency", "rsvp.flowspec.J0_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0004,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_SOH_RSOH_DCC_transparency,
         { "SOH/RSOH DCC transparency", "rsvp.flowspec.SOH_RSOH_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0008,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_LOH_MSOH_DCC_transparency,
         { "LOH/MSOH DCC transparency", "rsvp.flowspec.LOH_MSOH_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0010,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_LOH_MSOH_extended_DCC_transparency,
         { "LOH/MSOH Extended DCC transparency", "rsvp.flowspec.LOH_MSOH_extended_DCC_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0020,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_K1_K2_transparency,
         { "K1/K2 transparency", "rsvp.flowspec.K1_K2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0040,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_E1_transparency,
         { "E1 transparency", "rsvp.flowspec.E1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0080,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_F1_transparency,
         { "F1 transparency", "rsvp.flowspec.F1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0100,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_E2_transparency,
         { "E2 transparency", "rsvp.flowspec.E2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0200,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_B1_transparency,
         { "B1 transparency", "rsvp.flowspec.B1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0400,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_B2_transparency,
         { "B2 transparency", "rsvp.flowspec.B2_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x0800,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_M0_transparency,
         { "M0 transparency", "rsvp.flowspec.M0_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x1000,
           NULL, HFILL }
        },

        {&hf_rsvp_flowspec_M1_transparency,
         { "M1 transparency", "rsvp.flowspec.M1_transparency",
           FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x2000,
           NULL, HFILL }
        },

        {&hf_rsvp_integrity_flags_handshake,
         { "Handshake", "rsvp.integrity.flags.handshake",
           FT_BOOLEAN, 8, TFS(&tfs_capable_not_capable), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_sa_flags_local,
         { "Local protection", "rsvp.sa.flags.local",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_sa_flags_label,
         { "Label recording", "rsvp.sa.flags.label",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_sa_flags_se_style,
         { "SE style", "rsvp.sa.flags.se_style",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_sa_flags_bandwidth,
         { "Bandwidth protection", "rsvp.sa.flags.bandwidth",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_sa_flags_node,
         { "Node protection", "rsvp.sa.flags.node",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_local_avail,
         { "Local Protection", "rsvp.rro.flags.local_avail",
           FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_local_in_use,
         { "Local Protection", "rsvp.rro.flags.local_in_use",
           FT_BOOLEAN, 8, TFS(&tfs_used_notused), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_bandwidth,
         { "Bandwidth Protection", "rsvp.rro.flags.bandwidth",
           FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_node,
         { "Node Protection", "rsvp.rro.flags.node",
           FT_BOOLEAN, 8, TFS(&tfs_available_not_available), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_node_address,
         { "Address Specifies a Node-id Address", "rsvp.rro.flags.node_address",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_backup_tunnel_bandwidth,
         { "Backup Tunnel Has Bandwidth", "rsvp.rro.flags.backup_tunnel_bandwidth",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_backup_tunnel_hop,
         { "Backup Tunnel Goes To", "rsvp.rro.flags.backup_tunnel_hop",
           FT_BOOLEAN, 8, TFS(&tfs_next_next_hop_next_hop), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_rro_flags_global_label,
         { "Global label", "rsvp.rro.flags.global_label",
           FT_BOOLEAN, 8, NULL, 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_e2e,
         { "End-to-end re-routing", "rsvp.lsp_attr.e2e",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000001, /* 0 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_boundary,
         { "Boundary re-routing", "rsvp.lsp_attr.boundary",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000002, /* 1 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_segment,
         { "Segment-based re-routing", "rsvp.lsp_attr.segment",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000004, /* 2 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_integrity,
         { "LSP Integrity Required", "rsvp.lsp_attr.integrity",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000008, /* 3 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_contiguous,
         { "Contiguous LSP", "rsvp.lsp_attr.contiguous",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000010, /* 4 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_stitching,
         { "LSP stitching desired", "rsvp.lsp_attr.stitching",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000020, /* 5 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_preplanned,
         { "Pre-Planned LSP Flag", "rsvp.lsp_attr.preplanned",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000040, /* 6 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_nophp,
         { "Non-PHP behavior flag", "rsvp.lsp_attr.nophp",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000080, /* 7 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_oobmap,
         { "OOB mapping flag", "rsvp.lsp_attr.oobmap",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000100, /* 8 */
           NULL, HFILL }
        },
        {&hf_rsvp_lsp_attr_entropy,
         { "Entropy Label Capability", "rsvp.lsp_attr.entropy",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000200, /* 9 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_srlgcollect,
         { "SRLG Collection Flag", "rsvp.lsp_attr.srlgcollect",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000400, /* 10 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_costcollect,
         { "Cost Collection Flag", "rsvp.lsp_attr.costcollect",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00000800, /* 11 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_latcollect,
         { "Latency Collection Flag", "rsvp.lsp_attr.latcollect",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00001000, /* 12 */
           NULL, HFILL }
        },

        {&hf_rsvp_lsp_attr_latvarcollect,
         { "Latency Variation Flag", "rsvp.lsp_attr.latvarcollect",
           FT_BOOLEAN, 32, TFS(&tfs_desired_not_desired), 0x00002000, /* 13 */
           NULL, HFILL }
        },

        {&hf_rsvp_gen_uni_direction,
         { "Direction", "rsvp.gen_uni.direction",
           FT_BOOLEAN, 8, TFS(&tfs_gen_uni_direction), 0x80,
           NULL, HFILL }
        },

        {&hf_rsvp_protection_info_flags_secondary_lsp,
         { "Secondary LSP", "rsvp.pi.flags.secondary_lsp",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_extra_traffic,
         { "Extra Traffic", "rsvp.pi_link.flags.extra_traffic",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_unprotected,
         { "Unprotected", "rsvp.pi_link.flags.unprotected",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_shared,
         { "Shared", "rsvp.pi_link.flags.shared",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_dedicated1_1,
         { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated1_1",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_dedicated1plus1,
         { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated1plus1",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_enhanced,
         { "Enhanced", "rsvp.pi_link.flags.enhanced",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x20,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_extra,
         { "Extra Traffic", "rsvp.pi_link.flags.extra",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_dedicated_1_1,
         { "Dedicated 1:1", "rsvp.pi_link.flags.dedicated_1_1",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_link_flags_dedicated_1plus1,
         { "Dedicated 1+1", "rsvp.pi_link.flags.dedicated_1plus1",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_rfc4872_secondary,
         { "Secondary LSP", "rsvp.rfc4872.secondary",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
           NULL, HFILL }
        },

        {&hf_rsvp_rfc4872_protecting,
         { "Protecting LSP", "rsvp.rfc4872.protecting",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
           NULL, HFILL }
        },

        {&hf_rsvp_rfc4872_notification_msg,
         { "Protecting LSP", "rsvp.rfc4872.notification_msg",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
           NULL, HFILL }
        },

        {&hf_rsvp_rfc4872_operational,
         { "Protecting LSP", "rsvp.rfc4872.operational",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_lsp_flags_full_rerouting,
         { "(Full) rerouting", "rsvp.pi_lsp.flags.full_rerouting",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_lsp_flags_rerouting_extra,
         { "Rerouting without extra-traffic", "rsvp.pi_lsp.flags.rerouting_extra",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_lsp_flags_1_n_protection,
         { "1:N protection with extra-traffic", "rsvp.pi_lsp.flags.1_n_protection",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_lsp_flags_1plus1_unidirectional,
         { "1+1 unidirectional protection", "rsvp.pi_lsp.flags.1plus1_unidirectional",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_lsp_flags_1plus1_bidirectional,
         { "1+1 bidirectional protection", "rsvp.pi_lsp.flags.1plus1_bidirectional",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_protection_info_in_place,
         { "In-Place", "rsvp.protection_info.in_place",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
           NULL, HFILL }
        },

        {&hf_rsvp_protection_info_required,
         { "Required", "rsvp.protection_info.required",
           FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_seg_flags_full_rerouting,
         { "(Full) rerouting", "rsvp.pi_seg.flags.full_rerouting",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_seg_flags_rerouting_extra,
         { "Rerouting without extra-traffic", "rsvp.pi_seg.flags.rerouting_extra",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_seg_flags_1_n_protection,
         { "1:N protection with extra-traffic", "rsvp.pi_seg.flags.1_n_protection",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x04,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_seg_flags_1plus1_unidirectional,
         { "1+1 unidirectional protection", "rsvp.pi_seg.flags.1plus1_unidirectional",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x08,
           NULL, HFILL }
        },

        {&hf_rsvp_pi_seg_flags_1plus1_bidirectional,
         { "1+1 bidirectional protection", "rsvp.pi_seg.flags.1plus1_bidirectional",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x10,
           NULL, HFILL }
        },

        {&hf_rsvp_frr_flags_one2one_backup,
         { "One-to-One Backup", "rsvp.frr.flags.one2one_backup",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x01,
           NULL, HFILL }
        },

        {&hf_rsvp_frr_flags_facility_backup,
         { "Facility Backup", "rsvp.frr.flags.facility_backup",
           FT_BOOLEAN, 8, TFS(&tfs_desired_not_desired), 0x02,
           NULL, HFILL }
        },
        {&hf_rsvp_c_type,
         { "C-Type", "rsvp.ctype",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tid,
         { "Transaction ID", "rsvp.3gpp_obj.tid",
           FT_UINT32, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_ie_len,
         { "Length", "rsvp.3gpp_obj.length",
           FT_UINT32, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_ie_type,
         { "IE Type", "rsvp.3gpp_obj.ie_type",
           FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_object_ie_type_vals), 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_ue_ipv4_addr,
         { "UE IPv4 address", "rsvp.3gpp_obj.ue_ipv4_addr",
           FT_IPv4, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_ue_ipv6_addr,
         { "UE IPv6 address", "rsvp.3gpp_obj.ue_ipv6_addr",
           FT_IPv6, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_d,
         { "Direction(D)", "rsvp.3gpp_obj.tft_d",
           FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_object_tft_d_vals), 0xc0000000,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_ns,
         { "Non-Specific bit(NS)", "rsvp.3gpp_obj.tft_ns",
           FT_UINT32, BASE_DEC, NULL, 0x08000000,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_sr_id,
         { "SR_ID", "rsvp.3gpp_obj.tft_sr_id",
           FT_UINT32, BASE_DEC, NULL, 0x07000000,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_p,
         { "Persistency(P)", "rsvp.3gpp_obj.tft_p",
           FT_UINT32, BASE_DEC, NULL, 0x00010000,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_opcode,
         { "TFT Operation Code", "rsvp.3gpp_obj.tft_opcode",
           FT_UINT32, BASE_DEC, VALS(rsvp_3gpp_obj_tft_opcode_vals), 0x000ff00,
           NULL, HFILL }
        },
        {&hf_rsvp_3gpp_obj_tft_n_pkt_flt,
         { "Number of Packet filters", "rsvp.3gpp_obj.tft_n_pkt_flt",
           FT_UINT32, BASE_DEC, NULL, 0x00000ff,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_flow_id,
         { "Flow Identifier", "rsvp.3gpp_obj.flow_id",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_ev_prec,
         { "Packet filter evaluation precedence", "rsvp.3gpp_obj.pf_ev_prec",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_len,
         { "Packet filter length", "rsvp.3gpp_obj.pf_len",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_type,
         { "PF Type", "rsvp.3gpp_obj.pf_type",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_cont_len,
         { "Length", "rsvp.3gpp_obj.pf_cont_len",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_comp_type_id,
         { "PF component identifier", "rsvp.3gpp_obj.pf_comp_type_id",
           FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_pf_comp_type_id_vals), 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_src_ipv4,
         { "IPv4 Source Address", "rsvp.3gpp_obj.pf_src_ipv4",
           FT_IPv4, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_dst_ipv4,
         { "IPv4 Destination Address", "rsvp.3gpp_obj.pf_dst_ipv4",
           FT_IPv4, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_ipv4_mask,
         { "IPv4 Mask", "rsvp.3gpp_obj.pf_ipv4_mask",
           FT_UINT32, BASE_HEX, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_src_ipv6,
         { "IPv6 Source Address", "rsvp.3gpp_obj.pf_src_ipv6",
           FT_IPv6, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_dst_ipv6,
         { "IPv6 Destination Address", "rsvp.3gpp_obj.pf_dst_ipv6",
           FT_IPv6, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_ipv6_prefix_length,
         { "IPv6 Prefix length", "rsvp.3gpp_obj.pf_ipv6_prefix_length",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_prot_next,
         { "Protocol field(IPv4) or Next Header(IPv6)", "rsvp.3gpp_obj.pf_prot_next",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_dst_port,
         { "Single Destination Port", "rsvp.3gpp_obj.pf_dst_port",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_src_port,
         { "Single Source Port", "rsvp.3gpp_obj.pf_src_port",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_ipsec_spi,
         { "IPsec SPI", "rsvp.3gpp_obj.pf_ipsec_spi",
           FT_UINT32, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_tos_tc,
         { "Type of Service (IPv4)/Traffic Class (IPv6)", "rsvp.3gpp_obj.pf_tos_tc",
           FT_UINT8, BASE_HEX, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_flow_lbl,
         { "Flow label", "rsvp.3gpp_obj.pf_flow_lbl",
           FT_UINT24, BASE_DEC, NULL, 0x0fffff,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_ipv6,
         { "IPv6 Address", "rsvp.3gpp_obj.pf_ipv6",
           FT_IPv6, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_treatment,
         { "PF Treatment", "rsvp.3gpp_obj.pf_treatment",
           FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_pf_treatment_vals), 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_pf_hint,
         { "PF Hint", "rsvp.3gpp_obj.pf_hint",
           FT_UINT32, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_obj_tft_qos_list_len,
         { "QoS List Length", "rsvp.3gpp_obj.qos_list_len",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_r_qos_blob_len,
         { "R_QOS_SUB_BLOB_LEN", "rsvp.3gpp_obj.r_qos_blob_len",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_r_qos_blob_flow_pri,
         { "FLOW_PRIORITY", "rsvp.3gpp_obj.r_qos_blob.flow_pri",
           FT_UINT8, BASE_DEC, NULL, 0xf0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_r_qos_blob_num_qos_att_set,
         { "NUM_QoS_ATTRIBUTE_SETS", "rsvp.3gpp_obj.r_qos_blob.num_qos_att_set",
           FT_UINT8, BASE_DEC, NULL, 0x0e,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_att_set_len,
         { "QoS_ATTRIBUTE_SET_LEN", "rsvp.3gpp_obj.r_qos_blob.qos_att_set_len",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_set_id,
         { "QoS_ATTRIBUTE_SET_ID", "rsvp.3gpp_obj.r_qos_blob.qos_attribute_set_id",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_verbose,
         { "VERBOSE", "rsvp.3gpp_obj.r_qos_blob.verbose",
           FT_BOOLEAN, 8, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_prof_id,
         { "ProfileID", "rsvp.3gpp_obj.r_qos_blob.prof_id",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_traff_cls,
         { "Traffic_Class", "rsvp.3gpp_obj.r_qos_blob.traff_cls",
           FT_UINT8, BASE_DEC, VALS(rsvp_3gpp_obj_traffic_class_vals), 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_peak_rate,
         { "Peak_Rate", "rsvp.3gpp_obj.r_qos_blob.peak_rate",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_bucket_size,
         { "Bucket_Size", "rsvp.3gpp_obj.r_qos_blob.bucket_size",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_token_rate,
         { "Token_Rate", "rsvp.3gpp_obj.r_qos_blob.token_rate",
           FT_UINT16, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_max_latency,
         { "Max_Latency", "rsvp.3gpp_obj.r_qos_blob.max_latency",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_max_loss_rte,
         { "Max_Loss_Rate", "rsvp.3gpp_obj.r_qos_blob.max_loss_rte",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_delay_var_sensitive,
         { "Delay_Var_Sensitive", "rsvp.3gpp_obj.r_qos_blob.delay_var_sensitive",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_attribute_reserved,
         { "Reserved", "rsvp.3gpp_obj.r_qos_blob.reserved",
           FT_UINT8, BASE_DEC, NULL, 0x0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_r_qos_blob,
         { "R_QOS_SUB_BLOB", "rsvp.3gpp_obj.r_qos_blob",
           FT_BYTES, BASE_NONE, NULL, 0,
           NULL, HFILL }
        },
        { &hf_rsvp_3gpp_qos_result,
         { "Result Code", "rsvp.3gpp_obj.qos_result_code",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL }
        },

        { &hf_rsvp_xro_sobj_lbit,
          { "L(oose) bit", "rsvp.xro.sobj.lbit",
            FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_lbit_vals), 0x80,
            NULL, HFILL
          }
        },

        { &hf_rsvp_xro_sobj_type,
          { "Type", "rsvp.xro.sobj.type",
            FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_type_vals), 0,
            NULL, HFILL
          }
        },

        { &hf_rsvp_xro_sobj_len,
          { "Length", "rsvp.xro.sobj.len",
            FT_UINT8, BASE_DEC, NULL, 0,
            NULL, HFILL
          }
        },

        { &hf_rsvp_xro_sobj_ipv4_addr,
         { "IPv4 prefix", "rsvp.xro.sobj.ipv4.addr",
           FT_IPv4, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_ipv4_prefix,
         { "Prefix Length", "rsvp.xro.sobj.ipv4.prefix",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_ipv4_attr,
         { "Attribute", "rsvp.xro.sobj.ipv4.attr",
           FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_ip_attr_vals), 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_ipv6_addr,
         { "IPv6 prefix", "rsvp.xro.sobj.ipv6.addr",
           FT_IPv6, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_ipv6_prefix,
         { "Prefix Length", "rsvp.xro.sobj.ipv6.prefix",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_ipv6_attr,
         { "Attribute", "rsvp.xro.sobj.ipv6.attr",
           FT_UINT8, BASE_DEC, VALS(rsvp_xro_sobj_ip_attr_vals), 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_srlg_id,
         { "SRLG Id", "rsvp.xro.sobj.srlg.id",
           FT_UINT32, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_xro_sobj_srlg_res,
         { "Reserved", "rsvp.xro.sobj.srlg.res",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_private_data,
         { "Data", "rsvp.private.data",
           FT_BYTES, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_numtlvs,
         { "Num TLVs", "rsvp.juniper.tlvs",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_padlength,
         { "Padlength", "rsvp.juniper.padlength",
           FT_UINT16, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_type,
         { "Juniper type", "rsvp.juniper.type",
           FT_UINT8, BASE_HEX, VALS(rsvp_juniper_attr_vals), 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_length,
         { "Juniper length", "rsvp.juniper.length",
           FT_UINT8, BASE_DEC, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_cos,
         { "Cos", "rsvp.juniper.attrib.cos",
           FT_UINT16, BASE_HEX, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_metric1,
         { "Metric 1", "rsvp.juniper.attrib.metric1",
           FT_UINT16, BASE_HEX, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_metric2,
         { "Metric 2", "rsvp.juniper.attrib.metric2",
           FT_UINT16, BASE_HEX, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_ccc_status,
         { "CCC Status", "rsvp.juniper.attrib.ccc_status",
           FT_UINT16, BASE_HEX, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_path,
         { "Path type", "rsvp.juniper.attrib.path",
           FT_UINT16, BASE_HEX, VALS(rsvp_juniper_path_attr_vals), 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_attrib_unknown,
         { "Unknown", "rsvp.juniper.attrib.unknown",
           FT_UINT16, BASE_HEX, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_pad,
         { "Pad", "rsvp.juniper.pad",
           FT_BYTES, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_juniper_unknown,
         { "Unknown", "rsvp.juniper.unknown",
           FT_BYTES, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        },

        { &hf_rsvp_unknown_data,
         { "Data", "rsvp.unknown.data",
           FT_BYTES, BASE_NONE, NULL, 0,
           NULL, HFILL
         }
        }
    };

    gint *ett_tree[TT_MAX];

    /* Build the tree array */
    for (i=0; i<TT_MAX; i++) {
        ett_treelist[i] = -1;
        ett_tree[i] = &(ett_treelist[i]);
    }
    proto_rsvp = proto_register_protocol("Resource ReserVation Protocol (RSVP)",
                                         "RSVP", "rsvp");
    proto_register_field_array(proto_rsvp, rsvpf_info, array_length(rsvpf_info));
    proto_register_subtree_array(ett_tree, array_length(ett_tree));
    register_rsvp_prefs();

    /* Initialization routine for RSVP conversations */
    register_init_routine(&rsvp_init_protocol);
}

void
proto_reg_handoff_rsvp(void)
{
    dissector_handle_t rsvp_handle, rsvpe2ei_handle;

    rsvp_handle = new_create_dissector_handle(dissect_rsvp, proto_rsvp);
    rsvpe2ei_handle = new_create_dissector_handle(dissect_rsvp_e2ei, proto_rsvp);
    dissector_add_uint("ip.proto", IP_PROTO_RSVP, rsvp_handle);
    dissector_add_uint("ip.proto", IP_PROTO_RSVPE2EI, rsvpe2ei_handle);
    dissector_add_uint("udp.port", UDP_PORT_PRSVP, rsvp_handle);
    rsvp_tap = register_tap("rsvp");
}

/*
 * Editor modelines  -  http://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:
 */