summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-fldb.c
blob: d5374adf52121b277dfc4e0a0aeb4fa133b99508 (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
/* packet-dcerpc-fldb.c
 *
 * Routines for DCE DFS Fileset Location Server Calls
 * Copyright 2004, Jaime Fournier <Jaime.Fournier@hush.com>
 * This information is based off the released idl files from opengroup.
 * ftp://ftp.opengroup.org/pub/dce122/dce/src/file.tar.gz file/flserver/fldb_proc.idl
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "config.h"


#include <epan/packet.h>
#include "packet-dcerpc.h"
#include "packet-dcerpc-dce122.h"

void proto_register_fldb (void);
void proto_reg_handoff_fldb (void);

static int proto_fldb;
static int hf_fldb_opnum;

static int ett_fldb;
static int ett_fldb_vldbentry;
static int ett_fldb_afsnetaddr;
static int ett_fldb_siteflags;
static int ett_fldb_afsflags;
static int ett_fldb_vlconf_cell;
static int ett_fldb_afsNameString_t;


static e_guid_t uuid_fldb =
  { 0x4d37f2dd, 0xed43, 0x0000, {0x02, 0xc0, 0x37, 0xcf, 0x2e, 0x00, 0x00, 0x01}
};
static uint16_t ver_fldb = 4;

#if 0
static int hf_fldb_getentrybyname_rqst_var1;
static int hf_fldb_getentrybyname_rqst_key_size;
#endif
static int hf_fldb_releaselock_rqst_fsid_high;
static int hf_fldb_releaselock_rqst_fsid_low;
static int hf_fldb_releaselock_rqst_voltype;
static int hf_fldb_releaselock_rqst_voloper;
static int hf_fldb_setlock_rqst_fsid_high;
static int hf_fldb_setlock_rqst_fsid_low;
static int hf_fldb_setlock_rqst_voltype;
static int hf_fldb_setlock_rqst_voloper;
#if 0
static int hf_fldb_setlock_resp_st;
static int hf_fldb_setlock_resp_st2;
#endif
static int hf_fldb_listentry_rqst_previous_index;
static int hf_fldb_listentry_rqst_var1;
static int hf_fldb_listentry_resp_count;
static int hf_fldb_listentry_resp_next_index;
#if 0
static int hf_fldb_listentry_resp_key_t;
static int hf_fldb_listentry_resp_key_size;
static int hf_fldb_listentry_resp_key_t2;
static int hf_fldb_listentry_resp_key_size2;
static int hf_fldb_listentry_resp_voltype;
static int hf_fldb_createentry_rqst_key_t;
static int hf_fldb_createentry_rqst_key_size;
#endif
static int hf_fldb_deleteentry_rqst_fsid_high;
static int hf_fldb_deleteentry_rqst_fsid_low;
static int hf_fldb_deleteentry_rqst_voltype;
static int hf_fldb_deleteentry_rqst_voloper;
#if 0
static int hf_fldb_getentrybyid_rqst_fsid_high;
static int hf_fldb_getentrybyid_rqst_fsid_low;
static int hf_fldb_getentrybyid_rqst_voltype;
static int hf_fldb_getentrybyid_rqst_voloper;
#endif
static int hf_fldb_replaceentry_rqst_fsid_high;
static int hf_fldb_replaceentry_rqst_fsid_low;
static int hf_fldb_replaceentry_rqst_voltype;
#if 0
static int hf_fldb_replaceentry_rqst_key_size;
static int hf_fldb_replaceentry_rqst_key_t;
static int hf_fldb_replaceentry_resp_st;
static int hf_fldb_replaceentry_resp_st2;
#endif
#if 0
static int hf_fldb_getentrybyname_resp_volumetype;
static int hf_fldb_getentrybyname_resp_numservers;
static int hf_fldb_getentrybyname_resp_sitecookies;
static int hf_fldb_getentrybyname_resp_sitepartition;
static int hf_fldb_getentrybyname_resp_siteflags;
static int hf_fldb_getentrybyname_resp_sitemaxreplat;
static int hf_fldb_getentrybyname_resp_volid_high;
static int hf_fldb_getentrybyname_resp_volid_low;
static int hf_fldb_getentrybyname_resp_voltype;
static int hf_fldb_getentrybyname_resp_cloneid_high;
static int hf_fldb_getentrybyname_resp_cloneid_low;
static int hf_fldb_getentrybyname_resp_flags;
static int hf_fldb_getentrybyname_resp_maxtotallat;
static int hf_fldb_getentrybyname_resp_hardmaxtotlat;
static int hf_fldb_getentrybyname_resp_minpouncedally;
static int hf_fldb_getentrybyname_resp_defaultmaxreplat;
static int hf_fldb_getentrybyname_resp_reclaimdally;
static int hf_fldb_getentrybyname_resp_whenlocked;
static int hf_fldb_getentrybyname_resp_spare1;
static int hf_fldb_getentrybyname_resp_spare2;
static int hf_fldb_getentrybyname_resp_spare3;
static int hf_fldb_getentrybyname_resp_spare4;
static int hf_fldb_getentrybyname_resp_key_t;
static int hf_fldb_getentrybyname_resp_key_size;
static int hf_fldb_getentrybyname_resp_test;
static int hf_dcerpc_error_status;
#endif
static int hf_fldb_vldbentry_volumename;
static int hf_fldb_vldbentry_volumetype;
static int hf_fldb_vldbentry_nservers;
static int hf_fldb_vldbentry_sitepartition;
static int hf_fldb_afsnetaddr_type;
static int hf_fldb_afsnetaddr_data;
static int hf_fldb_siteflags;
static int hf_fldb_vldbentry_sitemaxreplicalatency;
static int hf_fldb_vldbentry_siteprincipal;
static int hf_fldb_vldbentry_siteowner;
static int hf_fldb_vldbentry_siteobjid;
static int hf_fldb_vldbentry_volids_high;
static int hf_fldb_vldbentry_volids_low;
static int hf_fldb_vldbentry_voltypes;
static int hf_fldb_vldbentry_cloneid_high;
static int hf_fldb_vldbentry_cloneid_low;
static int hf_fldb_afsflags_flags;
static int hf_fldb_vldbentry_maxtotallatency;
static int hf_fldb_vldbentry_hardmaxtotallatency;
static int hf_fldb_vldbentry_minimumpouncedally;
static int hf_fldb_vldbentry_defaultmaxreplicalatency;
static int hf_fldb_vldbentry_reclaimdally;
static int hf_fldb_vldbentry_whenlocked;
static int hf_fldb_vldbentry_spare1;
static int hf_fldb_vldbentry_spare2;
static int hf_fldb_vldbentry_spare3;
static int hf_fldb_vldbentry_spare4;
static int hf_fldb_vldbentry_lockername;
static int hf_fldb_vldbentry_charspares;
static int hf_fldb_vlconf_cell_name;
static int hf_fldb_vlconf_cell_cellid_high;
static int hf_fldb_vlconf_cell_cellid_low;
static int hf_fldb_vlconf_cell_numservers;
static int hf_fldb_vlconf_cell_hostname;
static int hf_fldb_vlconf_cell_spare1;
static int hf_fldb_vlconf_cell_spare2;
static int hf_fldb_vlconf_cell_spare3;
static int hf_fldb_vlconf_cell_spare4;
static int hf_fldb_vlconf_cell_spare5;
static int hf_fldb_flagsp;
static int hf_fldb_nextstartp;
static int hf_fldb_afsNameString_t_principalName_string;
static int hf_fldb_afsNameString_t_principalName_size;
/* static int hf_fldb_afsNameString_t_principalName_size2; */
static int hf_fldb_namestring;
static int hf_error_st;
static int hf_fldb_creationquota;
static int hf_fldb_creationuses;
static int hf_fldb_deletedflag;
/* static int hf_fldb_namestring_size; */
static int hf_fldb_numwanted;
static int hf_fldb_spare2;
static int hf_fldb_spare3;
static int hf_fldb_spare4;
static int hf_fldb_spare5;
static int hf_fldb_uuid_objid;
static int hf_fldb_uuid_owner;
static int hf_fldb_volid_high;
static int hf_fldb_volid_low;
static int hf_fldb_voltype;
static uint32_t st;
static const uint8_t *st_str;

#define AFS_FLAG_RETURNTOKEN         0x00001
#define AFS_FLAG_TOKENJUMPQUEUE      0x00002
#define AFS_FLAG_SKIPTOKEN           0x00004
#define AFS_FLAG_NOOPTIMISM          0x00008
#define AFS_FLAG_TOKENID             0x00010
#define AFS_FLAG_RETURNBLOCKER       0x00020
#define AFS_FLAG_ASYNCGRANT          0x00040
#define AFS_FLAG_NOREVOKE            0x00080
#define AFS_FLAG_MOVE_REESTABLISH    0x00100
#define AFS_FLAG_SERVER_REESTABLISH  0x00200
#define AFS_FLAG_NO_NEW_EPOCH        0x00400
#define AFS_FLAG_MOVE_SOURCE_OK      0x00800
#define AFS_FLAG_SYNC                0x01000
#define AFS_FLAG_ZERO                0x02000
#define AFS_FLAG_SKIPSTATUS          0x04000
#define AFS_FLAG_FORCEREVOCATIONS    0x08000
#define AFS_FLAG_FORCEVOLQUIESCE     0x10000
#define AFS_FLAG_FORCEREVOCATIONDOWN 0x20000

#define AFS_FLAG_SEC_SERVICE           0x01
#define AFS_FLAG_CONTEXT_NEW_IF        0x02
#define AFS_FLAG_CONTEXT_DO_RESET      0x04
#define AFS_FLAG_CONTEXT_NEW_ACL_IF    0x08
#define AFS_FLAG_CONTEXT_NEW_TKN_TYPES 0x10

#define VLSF_NEWREPSITE   0x01
#define VLSF_SPARE1       0x02
#define VLSF_SPARE2       0x04    /* used for VLSF_RWVOL in flprocs.c */
#define VLSF_SPARE3       0x08    /* used for VLSF_BACKVOL in flprocs.c */
#define VLSF_SAMEASPREV   0x10
#define VLSF_DEFINED      0x20
#define VLSF_PARTIALADDRS 0x40
#define VLSF_ZEROIXHERE         0x80000000

#define MACRO_ST_CLEAR(name) \
  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_error_st, &st); \
  st_str = val_to_str_ext (st, &dce_error_vals_ext, "%u");              \
  if (st) {                                                              \
      col_add_fstr (pinfo->cinfo, COL_INFO, "%s st:%s ", name, st_str); \
  } else {                                                                \
      col_append_fstr (pinfo->cinfo, COL_INFO, " st:%s ", st_str);      \
  }


static int
dissect_afsnetaddr (tvbuff_t *tvb, int offset,
                    packet_info *pinfo, proto_tree *parent_tree,
                    dcerpc_info *di, uint8_t *drep)
{
  proto_item *item       = NULL;
  proto_tree *tree       = NULL;
  int         old_offset = offset;
  uint16_t    type;
  uint8_t     data;
  int         i;

  if (parent_tree)
    {
      tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
                                     ett_fldb_afsnetaddr, &item, "afsNetAddr:");
    }

/*                 unsigned16 type;
                   unsigned8 data[14];
*/

  offset =
    dissect_ndr_uint16 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_afsnetaddr_type, &type);

  if (type)
    {
      col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u ", type);

      for (i = 0; i < 14; i++)
        {
          offset =
            dissect_ndr_uint8 (tvb, offset, pinfo, tree, di, drep,
                               hf_fldb_afsnetaddr_data, &data);

          switch (i)
            {
            case 1:
              if (data)
                {
                  col_append_fstr (pinfo->cinfo, COL_INFO, " Port:%u", data);
                }
              break;
            case 2:
                col_append_fstr (pinfo->cinfo, COL_INFO, " IP:%u.", data);
              break;
            case 3:
                col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
              break;
            case 4:
                col_append_fstr (pinfo->cinfo, COL_INFO, "%u.", data);
              break;
            case 5:
                col_append_fstr (pinfo->cinfo, COL_INFO, "%u", data);
              break;
            }

        }
    }
  else
    {
      offset += 14;             /* space left after reading in type for the array. */
    }

  proto_item_set_len (item, offset - old_offset);

  return offset;
}


static int
dissect_vlconf_cell (tvbuff_t *tvb, int offset,
                     packet_info *pinfo, proto_tree *parent_tree,
                     dcerpc_info *di, uint8_t *drep)
{
  proto_item   *item       = NULL;
  proto_tree   *tree       = NULL;
  int           old_offset = offset;
#define MAXVLCELLCHARS    128
#define MAXVLHOSTSPERCELL 64
  const uint8_t *name, *hostname;
  int           i;
  uint32_t      cellid_high, cellid_low, numservers, spare1, spare2, spare3, spare4,
    spare5;

  if (parent_tree)
    {
      tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
                                     ett_fldb_vlconf_cell, &item, "vlconf_cell:");
    }

  /* byte name[MAXVLCELLCHARS];          Cell name */
  proto_tree_add_item (tree, hf_fldb_vlconf_cell_name, tvb, offset, 114, ENC_ASCII);
  name = tvb_get_string_enc(pinfo->pool, tvb, offset, MAXVLCELLCHARS, ENC_ASCII); /* XXX why 114 above and 128 here?? */
  offset += MAXVLCELLCHARS;     /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
  col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", name);

  /* afsHyper CellID;                     identifier for that cell  */

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_cellid_high, &cellid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_cellid_low, &cellid_low);
  col_append_fstr (pinfo->cinfo, COL_INFO, " CellID:%u-%u", cellid_high,
                     cellid_low);

  /* unsigned32 numServers;              *Num active servers for the cell */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_numservers, &numservers);
  col_append_fstr (pinfo->cinfo, COL_INFO, " numServers:%u", numservers);

  /*    afsNetAddr hostAddr[MAXVLHOSTSPERCELL]; *addresses for cell's servers */
  for (i = 0; i < MAXVLHOSTSPERCELL; i++)
    {
      offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);
    }

  /* hostnam hostName[MAXVLHOSTSPERCELL];        *Names for cell's servers* */

  for (i = 0; i < MAXVLHOSTSPERCELL; i++)
    {
      proto_tree_add_item_ret_string(tree, hf_fldb_vlconf_cell_hostname, tvb, offset,
                             64, ENC_ASCII|ENC_NA, pinfo->pool, &hostname);
      offset += 64;             /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
      col_append_fstr (pinfo->cinfo, COL_INFO, " hostName: %s", hostname);
    }

  /*     unsigned32 spare1; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_spare1, &spare1);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare1:%u", spare1);

  /*     unsigned32 spare2; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_spare2, &spare2);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare2:%u", spare2);

  /*     unsigned32 spare3; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_spare3, &spare3);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare3:%u", spare3);

  /*     unsigned32 spare4; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_spare4, &spare4);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare4:%u", spare4);

  /*     unsigned32 spare5; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vlconf_cell_spare5, &spare5);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare5:%u", spare5);

  proto_item_set_len (item, offset - old_offset);

  return offset;
}


static int
dissect_afsNameString_t (tvbuff_t *tvb, int offset,
                         packet_info *pinfo, proto_tree *parent_tree,
                         dcerpc_info *di, uint8_t *drep)
{
/*
typedef [string] byte   NameString_t[AFS_NAMEMAX];
*/

  proto_item   *item       = NULL;
  proto_tree   *tree       = NULL;
  int           old_offset = offset;
#define AFS_NAMEMAX 256
  uint32_t      string_size;
  const uint8_t *namestring;

  if (di->conformant_run)
    {
      return offset;
    }

  if (parent_tree)
    {
      tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1,
                                     ett_fldb_afsNameString_t, &item, "afsNameString_t:");    }

  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                               hf_fldb_afsNameString_t_principalName_size,
                               &string_size);
  col_append_fstr (pinfo->cinfo, COL_INFO, " String_size:%u", string_size);
  if (string_size < AFS_NAMEMAX)
    {
/* proto_tree_add_string(tree, id, tvb, start, length, value_ptr); */
      proto_tree_add_item_ret_string(tree, hf_fldb_afsNameString_t_principalName_string,
                             tvb, offset, string_size, ENC_ASCII|ENC_NA, pinfo->pool, &namestring);
      offset += string_size;
        col_append_fstr (pinfo->cinfo, COL_INFO, " Principal:%s", namestring);
    }
  else
    {
        col_append_fstr (pinfo->cinfo, COL_INFO,
                         " :FIXME!: Invalid string length of  %u",
                         string_size);
    }
  proto_item_set_len (item, offset - old_offset);
  return offset;
}


static int
dissect_afsflags (tvbuff_t *tvb, int offset,
                  packet_info *pinfo, proto_tree *parent_tree,
                  dcerpc_info *di, uint8_t *drep)
{
  proto_item *item       = NULL;
  proto_tree *tree       = NULL;
  int         old_offset = offset;
  uint32_t    afsflags;

  if (parent_tree)
    {
      tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_afsflags, &item, "afsFlags:");
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_afsflags_flags, &afsflags);
  if (afsflags)
    {
      col_append_str (pinfo->cinfo, COL_INFO, " afsFlags=");
      if ((afsflags & AFS_FLAG_RETURNTOKEN) == AFS_FLAG_RETURNTOKEN)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":RETURNTOKEN");
        }
      if ((afsflags & AFS_FLAG_TOKENJUMPQUEUE) == AFS_FLAG_TOKENJUMPQUEUE)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":TOKENJUMPQUEUE");
        }
      if ((afsflags & AFS_FLAG_SKIPTOKEN) == AFS_FLAG_SKIPTOKEN)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SKIPTOKEN");
        }
      if ((afsflags & AFS_FLAG_NOOPTIMISM) == AFS_FLAG_NOOPTIMISM)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":NOOPTIMISM");
        }
      if ((afsflags & AFS_FLAG_TOKENID) == AFS_FLAG_TOKENID)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":TOKENID");
        }
      if ((afsflags & AFS_FLAG_RETURNBLOCKER) == AFS_FLAG_RETURNBLOCKER)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":RETURNBLOCKER");
        }
      if ((afsflags & AFS_FLAG_ASYNCGRANT) == AFS_FLAG_ASYNCGRANT)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":ASYNCGRANT");
        }
      if ((afsflags & AFS_FLAG_NOREVOKE) == AFS_FLAG_NOREVOKE)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":NOREVOKE");
        }
      if ((afsflags & AFS_FLAG_MOVE_REESTABLISH) == AFS_FLAG_MOVE_REESTABLISH)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_REESTABLISH");
        }
      if ((afsflags & AFS_FLAG_SERVER_REESTABLISH) ==
          AFS_FLAG_SERVER_REESTABLISH)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SERVER_REESTABLISH");
          if ((afsflags & AFS_FLAG_NO_NEW_EPOCH) == AFS_FLAG_NO_NEW_EPOCH)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":NO_NEW_EPOCH");
            }
          if ((afsflags & AFS_FLAG_MOVE_SOURCE_OK) == AFS_FLAG_MOVE_SOURCE_OK)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":MOVE_SOURCE_OK");
            }
          if ((afsflags & AFS_FLAG_SYNC) == AFS_FLAG_SYNC)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":SYNC");
            }
          if ((afsflags & AFS_FLAG_ZERO) == AFS_FLAG_ZERO)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":ZERO");
            }
          if ((afsflags & AFS_FLAG_SKIPSTATUS) == AFS_FLAG_SKIPSTATUS)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":SKIPSTATUS");
            }
          if ((afsflags & AFS_FLAG_FORCEREVOCATIONS) ==
              AFS_FLAG_FORCEREVOCATIONS)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":FORCEREVOCATIONS");
            }
          if ((afsflags & AFS_FLAG_FORCEVOLQUIESCE) ==
              AFS_FLAG_FORCEVOLQUIESCE)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":FORCEVOLQUIESCE");
            }
          if ((afsflags & AFS_FLAG_SEC_SERVICE) == AFS_FLAG_SEC_SERVICE)
            {
              col_append_str (pinfo->cinfo, COL_INFO, ":SEC_SERVICE");
            }
          if ((afsflags & AFS_FLAG_CONTEXT_NEW_ACL_IF) ==
              AFS_FLAG_CONTEXT_NEW_ACL_IF)
            {
              col_append_str (pinfo->cinfo, COL_INFO,
                                ":CONTEXT_NEW_ACL_IF");
            }

        }
    }

  proto_item_set_len (item, offset - old_offset);

  return offset;
}


static int
dissect_siteflags (tvbuff_t *tvb, int offset,
                   packet_info *pinfo, proto_tree *parent_tree,
                   dcerpc_info *di, uint8_t *drep)
{
  proto_item *item       = NULL;
  proto_tree *tree       = NULL;
  int         old_offset = offset;
  uint32_t    siteflags;

  if (parent_tree)
    {
      tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_siteflags, &item, "SiteFlags:");
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_siteflags,
                        &siteflags);

  if (siteflags)
    {
      col_append_str (pinfo->cinfo, COL_INFO, " SiteFlags");
      if ((siteflags & VLSF_NEWREPSITE) == VLSF_NEWREPSITE)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":NEWREPSITE");
        }
      if ((siteflags & VLSF_SPARE1) == VLSF_SPARE1)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SPARE1");
        }
      if ((siteflags & VLSF_SPARE2) == VLSF_SPARE2)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SPARE2");
        }
      if ((siteflags & VLSF_SPARE3) == VLSF_SPARE3)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SPARE3");
        }
      if ((siteflags & VLSF_SAMEASPREV) == VLSF_SAMEASPREV)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":SAMEASPREV");
        }
      if ((siteflags & VLSF_DEFINED) == VLSF_DEFINED)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":DEFINED");
        }
      if ((siteflags & VLSF_PARTIALADDRS) == VLSF_PARTIALADDRS)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":PARTIALADDRS ");
        }
      if ((siteflags & VLSF_ZEROIXHERE) == VLSF_ZEROIXHERE)
        {
          col_append_str (pinfo->cinfo, COL_INFO, ":ZEROIXHERE");

        }
    }

  proto_item_set_len (item, offset - old_offset);

  return offset;
}


static int
dissect_vldbentry (tvbuff_t *tvb, int offset,
                   packet_info *pinfo, proto_tree *parent_tree,
                   dcerpc_info *di, uint8_t *drep)
{
  proto_item   *item;
  proto_tree   *tree;
  int           old_offset = offset;
  const uint8_t *volumename, *siteprincipal, *charspares, *lockername;
  uint32_t      volumetype, nservers, sitepartition, sitemaxreplicalatency;
  uint32_t      volids_high, volids_low, voltypes, cloneid_high, cloneid_low;
  uint32_t      maxtotallatency, hardmaxtotallatency, minimumpouncedally;
  uint32_t      defaultmaxreplicalatency, reclaimdally, whenlocked;
  uint32_t      spare1, spare2, spare3, spare4;
  e_guid_t      siteowner, siteobjid;
  int           i;
#define MAXNSERVERS 16
#define MAXVOLTYPES 8
#define MAXLOCKNAMELEN 64

  tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fldb_vldbentry, &item, "vldbentry:");

/*    byte            name[114];      Volume name  */

  proto_tree_add_item_ret_string(tree, hf_fldb_vldbentry_volumename, tvb, offset, 114,
                       ENC_ASCII|ENC_NA, pinfo->pool, &volumename);
  offset += 110;                /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
  col_append_fstr (pinfo->cinfo, COL_INFO, " Name: %s", volumename);

  /* unsigned32      volumeType; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_volumetype, &volumetype);
    col_append_fstr (pinfo->cinfo, COL_INFO, " Type:%u", volumetype);

  /*unsigned32      nServers; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_nservers, &nservers);
    col_append_fstr (pinfo->cinfo, COL_INFO, " nServers:%u", nservers);

  /* afsNetAddr      siteAddr[MAXNSERVERS]; 16 */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      /* col_append_fstr (pinfo->cinfo, COL_INFO, " Site:%u", i); */

      offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);
    }

/*                unsigned32      sitePartition[MAXNSERVERS]; */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      offset =
        dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_sitepartition, &sitepartition);
      if (sitepartition)
        {
            col_append_fstr (pinfo->cinfo, COL_INFO, " LFS:%u",
                             sitepartition);
        }
    }

  /* unsigned32      siteFlags[MAXNSERVERS]; */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      offset = dissect_siteflags (tvb, offset, pinfo, tree, di, drep);
    }

  /*  unsigned32      sitemaxReplicaLatency[MAXNSERVERS]; */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      offset =
        dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_sitemaxreplicalatency,
                            &sitemaxreplicalatency);
      if (sitemaxreplicalatency)
        {
            col_append_fstr (pinfo->cinfo, COL_INFO, " MaxRepLat%d:%u", i,
                             sitemaxreplicalatency);
        }
    }
  /* kerb_princ_name sitePrincipal[MAXNSERVERS];      principal  */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      proto_tree_add_item_ret_string(tree, hf_fldb_vldbentry_siteprincipal, tvb,
                           offset, 64, ENC_ASCII|ENC_NA, pinfo->pool, &siteprincipal);
      offset += 64;
        col_append_fstr (pinfo->cinfo, COL_INFO, " Princ: %s", siteprincipal);
    }

  /* afsUUID         siteOwner[MAXNSERVERS]; */

  for (i = 0; i < MAXNSERVERS; i++)
    {
      offset =
        dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_siteowner, &siteowner);
        col_append_fstr (pinfo->cinfo, COL_INFO,
                         " SiteOwner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                         siteowner.data1, siteowner.data2, siteowner.data3,
                         siteowner.data4[0], siteowner.data4[1],
                         siteowner.data4[2], siteowner.data4[3],
                         siteowner.data4[4], siteowner.data4[5],
                         siteowner.data4[6], siteowner.data4[7]);
    }

/*                afsUUID         siteObjID[MAXNSERVERS]; */
  for (i = 0; i < MAXNSERVERS; i++)
    {
      offset =
        dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_siteobjid, &siteobjid);
        col_append_fstr (pinfo->cinfo, COL_INFO,
                         " SiteObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                         siteobjid.data1, siteobjid.data2, siteobjid.data3,
                         siteobjid.data4[0], siteobjid.data4[1],
                         siteobjid.data4[2], siteobjid.data4[3],
                         siteobjid.data4[4], siteobjid.data4[5],
                         siteobjid.data4[6], siteobjid.data4[7]);
    }

  /* afsHyper        VolIDs[MAXVOLTYPES]; */
  /* XXX for these hypers, I will skip trying to use non portable uint64_t, and just read both, and use only low.
     never seen a case of a volid going anywhere the overflow of the 32 low; */
  for (i = 0; i < MAXVOLTYPES; i++)
    {
      offset =
        dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_volids_high, &volids_high);
      offset =
        dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_volids_low, &volids_low);
        col_append_fstr (pinfo->cinfo, COL_INFO, " VolIDs%d:%u", i,
                         volids_low);
    }

  /* unsigned32      VolTypes[MAXVOLTYPES]; */
  for (i = 0; i < MAXVOLTYPES; i++)
    {
      offset =
        dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                            hf_fldb_vldbentry_voltypes, &voltypes);
      if (voltypes)
        {
            col_append_fstr (pinfo->cinfo, COL_INFO, " VolTypes:%d:%u", i,
                             voltypes);
        }
    }

  /* afsHyper        cloneId;         Used during cloning  */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_cloneid_high, &cloneid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_cloneid_low, &cloneid_low);
  if (cloneid_low)
    {
        col_append_fstr (pinfo->cinfo, COL_INFO, " CloneId:%u", cloneid_low);
    }

  /*  unsigned32      flags;           General flags  */
  offset = dissect_afsflags (tvb, offset, pinfo, tree, di, drep);

  /* unsigned32      maxTotalLatency; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_maxtotallatency, &maxtotallatency);
    col_append_fstr (pinfo->cinfo, COL_INFO, " MaxTotLat:%u",
                     maxtotallatency);

  /* unsigned32      hardMaxTotalLatency; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_hardmaxtotallatency,
                        &hardmaxtotallatency);
    col_append_fstr (pinfo->cinfo, COL_INFO, " HardMaxTotLat:%u",
                     hardmaxtotallatency);

  /* unsigned32      minimumPounceDally; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_minimumpouncedally,
                        &minimumpouncedally);
    col_append_fstr (pinfo->cinfo, COL_INFO, " minPounceDally:%u",
                     minimumpouncedally);

  /* unsigned32      defaultMaxReplicaLatency; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_defaultmaxreplicalatency,
                        &defaultmaxreplicalatency);
    col_append_fstr (pinfo->cinfo, COL_INFO, " defaultMaxReplicaLatency:%u",
                     defaultmaxreplicalatency);

  /* unsigned32      reclaimDally; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_reclaimdally, &reclaimdally);
    col_append_fstr (pinfo->cinfo, COL_INFO, " reclaimDally:%u",
                     reclaimdally);

  /*   unsigned32      WhenLocked; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_whenlocked, &whenlocked);
    col_append_fstr (pinfo->cinfo, COL_INFO, " WhenLocked:%u", whenlocked);

  /*                unsigned32      spare1; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_spare1, &spare1);
    col_append_fstr (pinfo->cinfo, COL_INFO, " spare1:%u", spare1);

  /*                unsigned32      spare2; */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_spare2, &spare2);
    col_append_fstr (pinfo->cinfo, COL_INFO, " spare2:%u", spare2);

  /*                unsigned32      spare3; */
  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_spare3, &spare3);
    col_append_fstr (pinfo->cinfo, COL_INFO, " spare3:%u", spare3);

  /*                unsigned32      spare4; */
  offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_vldbentry_spare4, &spare4);
  col_append_fstr (pinfo->cinfo, COL_INFO, " spare4:%u", spare4);


  /* byte            LockerName[MAXLOCKNAMELEN]; */
  proto_tree_add_item_ret_string(tree, hf_fldb_vldbentry_lockername, tvb, offset,
                       MAXLOCKNAMELEN, ENC_ASCII|ENC_NA, pinfo->pool, &lockername);
  offset += MAXLOCKNAMELEN;     /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
  col_append_fstr (pinfo->cinfo, COL_INFO, " LockerName: %s", lockername);

  /*     byte            charSpares[50]; */
  proto_tree_add_item_ret_string(tree, hf_fldb_vldbentry_charspares, tvb, offset, 50,
                       ENC_ASCII|ENC_NA, pinfo->pool, &charspares);
  offset += 50;                 /* some reason this 114 seems to be incorrect... cutting 4 short to compensate.... */
  col_append_fstr (pinfo->cinfo, COL_INFO, " charSpares:%s", charspares);

  proto_item_set_len (item, offset - old_offset);

  return offset;
}


static int
fldb_dissect_getcellinfo_resp (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

/* [out] vlconf_cell *MyCell */
  offset = dissect_vlconf_cell (tvb, offset, pinfo, tree, di, drep);

  return offset;
}


static int
fldb_dissect_getentrybyname_rqst (tvbuff_t *tvb, int offset,
                                  packet_info *pinfo, proto_tree *tree,
                                  dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  /*
   *     [in] volumeName volName,
   */

  offset += 4;
  offset = dissect_afsNameString_t (tvb, offset, pinfo, tree, di, drep);

  return offset;
}


static int
fldb_dissect_getentrybyname_resp (tvbuff_t *tvb, int offset,
                                  packet_info *pinfo, proto_tree *tree,
                                  dcerpc_info *di, uint8_t *drep)
{
  /*
     [out] vldbentry *entry
   */
  if (di->conformant_run)
    {
      return offset;
    }

  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);

  MACRO_ST_CLEAR ("GetEntryByName reply");
  return offset;
}


static int
fldb_dissect_getsiteinfo_rqst (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  /*
   *   [in] afsNetAddr *OldAddr,
   *
   */

  offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);

  /*
   *
   * [in] afsNetAddr *OldAddr,
   *         unsigned16 type;
   unsigned8 data[14];
   */

  return offset;
}


static int
fldb_dissect_getsiteinfo_resp (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  const uint8_t *namestring;
  e_guid_t      owner, objid;
  uint32_t      creationquota, creationuses, deletedflag;
  uint32_t      spare2, spare3, spare4, spare5;

  if (di->conformant_run)
    {
      return offset;
    }

  /*
     [out] siteDessiib *FullSiteInfo
     afsNetAddr Addr[ADDRSINSITE];
     byte KerbPrin[MAXKPRINCIPALLEN] 64;
     afsUUID Owner;
     afsUUID ObjID;
     unsigned32 CreationQuota;
     unsigned32 CreationUses;
     unsigned32 DeletedFlag;
     unsigned32 spare2;
     unsigned32 spare3;
     unsigned32 spare4;
     unsigned32 spare5;
   */

  offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);

  /* handle byte KerbPrin[64]. */

  offset += 48;                 /* part of kerbprin before name... */

  proto_tree_add_item_ret_string(tree, hf_fldb_namestring, tvb, offset, 64, ENC_ASCII|ENC_NA, pinfo->pool, &namestring);
  offset += 64;
  col_append_fstr (pinfo->cinfo, COL_INFO, " %s", namestring);

  offset = dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep, hf_fldb_uuid_owner, &owner);
  col_append_fstr (pinfo->cinfo, COL_INFO,
                     " Owner - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                     owner.data1, owner.data2, owner.data3, owner.data4[0],
                     owner.data4[1], owner.data4[2], owner.data4[3],
                     owner.data4[4], owner.data4[5], owner.data4[6],
                     owner.data4[7]);

  offset =
    dissect_ndr_uuid_t (tvb, offset, pinfo, tree, di, drep, hf_fldb_uuid_objid,
                        &objid);
  col_append_fstr (pinfo->cinfo, COL_INFO,
                     " ObjID - %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
                     objid.data1, objid.data2, objid.data3, objid.data4[0],
                     objid.data4[1], objid.data4[2], objid.data4[3],
                     objid.data4[4], objid.data4[5], objid.data4[6],
                     objid.data4[7]);

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_creationquota,
                        &creationquota);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_creationuses,
                        &creationuses);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_deletedflag,
                        &deletedflag);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare2,
                        &spare2);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare3,
                        &spare3);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare4,
                        &spare4);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_spare5,
                        &spare5);

  col_append_fstr (pinfo->cinfo, COL_INFO,
                     " CreationQuota:%u CreationUses:%u DeletedFlag:%u Spare2:%u Spare3:%u Spare4:%u Spare5:%u",
                     creationquota, creationuses, deletedflag, spare2, spare3,
                     spare4, spare5);

  MACRO_ST_CLEAR ("GetSiteInfo reply");

  return offset;
}


static int
fldb_dissect_listentry_rqst (tvbuff_t *tvb, int offset,
                             packet_info *pinfo, proto_tree *tree,
                             dcerpc_info *di, uint8_t *drep)
{
  uint32_t var1, previous_index;

  if (di->conformant_run)
    {
      return offset;
    }

  /*
   *               [in] unsigned32 previous_index,
   *               [out] unsigned32 *count,
   *               [out] unsigned32 *next_index,
   *               [out] vldbentry *entry
   */

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_listentry_rqst_previous_index,
                        &previous_index);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_listentry_rqst_var1, &var1);


  col_append_fstr (pinfo->cinfo, COL_INFO, " :PrevIndex: %u",
                     previous_index);

  return offset;
}


static int
fldb_dissect_listentry_resp (tvbuff_t *tvb, int offset,
                             packet_info *pinfo, proto_tree *tree,
                             dcerpc_info *di, uint8_t *drep)
{
  uint32_t count, next_index;

  if (di->conformant_run)
    {
      return offset;
    }

  /*
   *               [out] unsigned32 *count,
   *               [out] unsigned32 *next_index,
   *               [out] vldbentry *entry
   */

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_listentry_resp_count, &count);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_listentry_resp_next_index, &next_index);
  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
  return offset;
}


static int
fldb_dissect_setlock_rqst (tvbuff_t *tvb, int offset,
                           packet_info *pinfo, proto_tree *tree,
                           dcerpc_info *di, uint8_t *drep)
{
  uint32_t fsid_high, fsid_low, voltype, voloper;

  if (di->conformant_run)
    {
      return offset;
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_setlock_rqst_fsid_high, &fsid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_setlock_rqst_fsid_low, &fsid_low);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_setlock_rqst_voltype, &voltype);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_setlock_rqst_voloper, &voloper);

  col_append_fstr (pinfo->cinfo, COL_INFO,
                     " :FSID:%u/%u VolType:0x%x VolOper:%u", fsid_high,
                     fsid_low, voltype, voloper);

  return offset;
}


static int
fldb_dissect_setlock_resp (tvbuff_t *tvb, int offset,
                           packet_info *pinfo, proto_tree *tree,
                           dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  MACRO_ST_CLEAR ("SetLock reply");

  return offset;
}


static int
fldb_dissect_deleteentry_resp (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  MACRO_ST_CLEAR ("DeleteEntry reply");

  return offset;
}


static int
fldb_dissect_deleteentry_rqst (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
/*
                [in] afsHyper *Volid,
                [in] unsigned32 voltype
*/

  uint32_t fsid_high, fsid_low, voltype, voloper;

  if (di->conformant_run)
    {
      return offset;
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_deleteentry_rqst_fsid_high, &fsid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_deleteentry_rqst_fsid_low, &fsid_low);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_deleteentry_rqst_voltype, &voltype);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_deleteentry_rqst_voloper, &voloper);

  col_append_fstr (pinfo->cinfo, COL_INFO, " :FSID:%u/%u", fsid_high,
                     fsid_low);


  return offset;
}


static int
fldb_dissect_createentry_resp (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  MACRO_ST_CLEAR ("CreateEntry reply");

  return offset;
}


static int
fldb_dissect_createentry_rqst (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
  return offset;
}


static int
fldb_dissect_getentrybyid_rqst (tvbuff_t *tvb, int offset,
                                packet_info *pinfo, proto_tree *tree,
                                dcerpc_info *di, uint8_t *drep)
{
  uint32_t volid_high, volid_low, voltype;

  if (di->conformant_run)
    {
      return offset;
    }

/*
                [in] afsHyper *Volid,
                [in] unsigned32 voltype,
*/

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_high,
                        &volid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_volid_low,
                        &volid_low);

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_voltype,
                        &voltype);

  col_append_fstr (pinfo->cinfo, COL_INFO, " VolID:%u/%u VolType:0x%x",
                     volid_high, volid_low, voltype);

  return offset;
}


static int
fldb_dissect_getnewvolumeids_rqst (tvbuff_t *tvb, int offset,
                                   packet_info *pinfo, proto_tree *tree,
                                   dcerpc_info *di, uint8_t *drep)
{
/*              [in] unsigned32 numWanted,
                [in] afsNetAddr *ServerAddr,
*/
  uint32_t numwanted;

  if (di->conformant_run)
    {
      return offset;
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_numwanted,
                        &numwanted);
  col_append_fstr (pinfo->cinfo, COL_INFO, " numWanted:%u", numwanted);

  offset = dissect_afsnetaddr (tvb, offset, pinfo, tree, di, drep);

  return offset;
}


static int
fldb_dissect_getentrybyid_resp (tvbuff_t *tvb, int offset,
                                packet_info *pinfo, proto_tree *tree,
                                dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);
  return offset;
}


static int
fldb_dissect_releaselock_resp (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  MACRO_ST_CLEAR ("ReleaseLock reply");


  return offset;
}


static int
fldb_dissect_releaselock_rqst (tvbuff_t *tvb, int offset,
                               packet_info *pinfo, proto_tree *tree,
                               dcerpc_info *di, uint8_t *drep)
{
  uint32_t fsid_high, fsid_low, voltype, voloper;

  if (di->conformant_run)
    {
      return offset;
    }

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_releaselock_rqst_fsid_high, &fsid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_releaselock_rqst_fsid_low, &fsid_low);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_releaselock_rqst_voltype, &voltype);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_releaselock_rqst_voloper, &voloper);

  col_append_fstr (pinfo->cinfo, COL_INFO, " :FSID:%u/%u", fsid_high,
                     fsid_low);

  return offset;

}


static int
fldb_dissect_replaceentry_resp (tvbuff_t *tvb, int offset,
                                packet_info *pinfo, proto_tree *tree,
                                dcerpc_info *di, uint8_t *drep)
{
  if (di->conformant_run)
    {
      return offset;
    }

  MACRO_ST_CLEAR ("ReplaceEntry reply");

  return offset;
}


static int
fldb_dissect_getnextserversbyid_resp (tvbuff_t *tvb, int offset,
                                      packet_info *pinfo, proto_tree *tree,
                                      dcerpc_info *di, uint8_t *drep)
{
  uint32_t nextstartp, flagsp;

  if (di->conformant_run)
    {
      return offset;
    }

  /*    [out] unsigned32 *nextStartP, */
/* XXX */
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_nextstartp,
                        &nextstartp);
  col_append_fstr (pinfo->cinfo, COL_INFO, " nextStartP:%u", nextstartp);

  /*  [out] vldbentry *entry, */
  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);


  /* [out] unsigned32 *flagsP */

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fldb_flagsp,
                        &flagsp);

  col_append_fstr (pinfo->cinfo, COL_INFO, " flagsp:%u", flagsp);

  return offset;
}


static int
fldb_dissect_replaceentry_rqst (tvbuff_t *tvb, int offset,
                                packet_info *pinfo, proto_tree *tree,
                                dcerpc_info *di, uint8_t *drep)
{
  uint32_t fsid_high, fsid_low, voltype;

  if (di->conformant_run)
    {
      return offset;
    }

  /*
   * [in] afsHyper *Volid,
   * [in] unsigned32 voltype,
   * [in] vldbentry *newentry,
   * [in] unsigned32 ReleaseType
   */

  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_replaceentry_rqst_fsid_high, &fsid_high);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_replaceentry_rqst_fsid_low, &fsid_low);
  offset =
    dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
                        hf_fldb_replaceentry_rqst_voltype, &voltype);

  col_append_fstr (pinfo->cinfo, COL_INFO, " FSID:%u/%u Name:", fsid_high,
                   fsid_low);

  offset = dissect_vldbentry (tvb, offset, pinfo, tree, di, drep);

  return offset;

}


static const dcerpc_sub_dissector fldb_dissectors[] = {
  {0, "GetEntryByID", fldb_dissect_getentrybyid_rqst,
   fldb_dissect_getentrybyid_resp},
  {1, "GetEntryByName", fldb_dissect_getentrybyname_rqst,
   fldb_dissect_getentrybyname_resp},
  {2, "Probe", NULL, NULL},
  {3, "GetCellInfo", NULL, fldb_dissect_getcellinfo_resp},
  {4, "GetNextServersByID", NULL, fldb_dissect_getnextserversbyid_resp},
  {5, "GetNextServersByName", NULL, NULL},
  {6, "GetSiteInfo", fldb_dissect_getsiteinfo_rqst,
   fldb_dissect_getsiteinfo_resp},
  {7, "GetCEntryByID", NULL, NULL},
  {8, "GetCEntryByName", NULL, NULL},
  {9, "GetCNextServersByID", NULL, NULL},
  {10, "GetCNextServersByName", NULL, NULL},
  {11, "ExpandSiteCookie", NULL, NULL},
  {12, "GetServerInterfaces", NULL, NULL},
  {13, "CreateEntry", fldb_dissect_createentry_rqst,
   fldb_dissect_createentry_resp},
  {14, "DeleteEntry", fldb_dissect_deleteentry_rqst,
   fldb_dissect_deleteentry_resp},
  {15, "GetNewVolumeId", NULL, NULL},
  {16, "ReplaceEntry", fldb_dissect_replaceentry_rqst,
   fldb_dissect_replaceentry_resp},
  {17, "SetLock", fldb_dissect_setlock_rqst, fldb_dissect_setlock_resp},
  {18, "ReleaseLock", fldb_dissect_releaselock_rqst,
   fldb_dissect_releaselock_resp},
  {19, "ListEntry", fldb_dissect_listentry_rqst, fldb_dissect_listentry_resp},
  {20, "ListByAttributes", NULL, NULL},
  {21, "GetStats", NULL, NULL},
  {22, "AddAddress", NULL, NULL},
  {23, "RemoveAddress", NULL, NULL},
  {24, "ChangeAddress", NULL, NULL},
  {25, "GenerateSites", NULL, NULL},
  {26, "GetNewVolumeIds", fldb_dissect_getnewvolumeids_rqst, NULL},
  {27, "CreateServer", NULL, NULL},
  {28, "AlterServer", NULL, NULL},
  {0, NULL, NULL, NULL},
};


void
proto_register_fldb (void)
{
  static hf_register_info hf[] = {
    {&hf_fldb_releaselock_rqst_fsid_low,
     {"FSID releaselock Low", "fldb.releaselock_rqst_fsid_low", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_releaselock_rqst_voltype,
     {"voltype", "fldb.releaselock_rqst_voltype", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_releaselock_rqst_voloper,
     {"voloper", "fldb.releaselock_rqst_voloper", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_setlock_rqst_fsid_high,
     {"FSID setlock Hi", "fldb.setlock_rqst_fsid_high", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_setlock_rqst_fsid_low,
     {"FSID setlock Low", "fldb.setlock_rqst_fsid_low", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_setlock_rqst_voltype,
     {"voltype", "fldb.setlock_rqst_voltype", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_setlock_rqst_voloper,
     {"voloper", "fldb.setlock_rqst_voloper", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
#if 0
    {&hf_fldb_setlock_resp_st,
     {"Error", "fldb.setlock_resp_st", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_setlock_resp_st2,
     {"Error", "fldb.setlock_resp_st2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
#endif
    {&hf_fldb_listentry_rqst_previous_index,
     {"Previous Index", "fldb.listentry_rqst_previous_index", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_listentry_rqst_var1,
     {"Var 1", "fldb.listentry_rqst_var1", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_listentry_resp_count,
     {"Count", "fldb.listentry_resp_count", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_listentry_resp_next_index,
     {"Next Index", "fldb.listentry_resp_next_index", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#if 0
    {&hf_fldb_listentry_resp_key_size,
     {"Key Size", "fldb.listentry_resp_key_size", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_listentry_resp_key_t,
     {"Volume", "fldb.listentry_resp_key_t", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_listentry_resp_voltype,
     {"VolType", "fldb.listentry_resp_voltype", FT_UINT32, BASE_HEX, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_listentry_resp_key_size2,
     {"key_size2", "fldb.listentry_resp_key_size2", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_listentry_resp_key_t2,
     {"Server", "fldb.listentry_resp_key_t2", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_createentry_rqst_key_t,
     {"Volume", "fldb.createentry_rqst_key_t", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_createentry_rqst_key_size,
     {"Volume Size", "fldb.createentry_rqst_key_size", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#endif
    {&hf_fldb_deleteentry_rqst_fsid_high,
     {"FSID deleteentry Hi", "fldb.deleteentry_rqst_fsid_high", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_deleteentry_rqst_fsid_low,
     {"FSID deleteentry Low", "fldb.deleteentry_rqst_fsid_low", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_deleteentry_rqst_voltype,
     {"voltype", "fldb.deleteentry_rqst_voltype", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_deleteentry_rqst_voloper,
     {"voloper", "fldb.deleteentry_rqst_voloper", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#if 0
    {&hf_fldb_getentrybyid_rqst_fsid_high,
     {"FSID deleteentry Hi", "fldb.getentrybyid_rqst_fsid_high", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyid_rqst_fsid_low,
     {"FSID getentrybyid Low", "fldb.getentrybyid_rqst_fsid_low",
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyid_rqst_voltype,
     {"voltype", "fldb.getentrybyid_rqst_voltype", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyid_rqst_voloper,
     {"voloper", "fldb.getentrybyid_rqst_voloper", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#endif
    {&hf_fldb_replaceentry_rqst_fsid_high,
     {"FSID replaceentry Hi", "fldb.replaceentry_rqst_fsid_high",
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_replaceentry_rqst_fsid_low,
     {"FSID  replaceentry Low", "fldb.replaceentry_rqst_fsid_low",
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_replaceentry_rqst_voltype,
     {"voltype", "fldb.replaceentry_rqst_voltype", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#if 0
    {&hf_fldb_replaceentry_rqst_key_t,
     {"Key", "fldb.replaceentry_rqst_key_t", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_replaceentry_rqst_key_size,
     {"Key Size", "fldb.replaceentry_rqst_key_size", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_replaceentry_resp_st,
     {"Error", "fldb.replaceentry_resp_st", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_replaceentry_resp_st2,
     {"Error", "fldb.replaceentry_resp_st2", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_volumetype,
     {"fldb_getentrybyname_resp_volumetype",
      "fldb.getentrybyname_resp_volumetype", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_numservers,
     {"fldb_getentrybyname_resp_numservers",
      "fldb.getentrybyname_resp_numservers", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_sitecookies,
     {"fldb_getentrybyname_resp_sitecookies",
      "fldb.getentrybyname_resp_sitecookies", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_sitepartition,
     {"fldb_getentrybyname_resp_sitepartition",
      "fldb.getentrybyname_resp_sitepartition", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_siteflags,
     {"fldb_getentrybyname_resp_siteflags",
      "fldb.getentrybyname_resp_siteflags", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_sitemaxreplat,
     {"fldb_getentrybyname_resp_sitemaxreplat",
      "fldb.getentrybyname_resp_sitemaxreplat", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_volid_high,
     {"fldb_getentrybyname_resp_volid_high",
      "fldb.getentrybyname_resp_volid_high", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_volid_low,
     {"fldb_getentrybyname_resp_volid_low",
      "fldb.getentrybyname_resp_volid_low", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_voltype,
     {"fldb_getentrybyname_resp_voltype",
      "fldb.getentrybyname_resp_voltype", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_cloneid_high,
     {"fldb_getentrybyname_resp_cloneid_high",
      "fldb.getentrybyname_resp_cloneid_high", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_cloneid_low,
     {"fldb_getentrybyname_resp_cloneid_low",
      "fldb.getentrybyname_resp_cloneid_low", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_flags,
     {"fldb_getentrybyname_resp_flags",
      "fldb.getentrybyname_resp_flags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_getentrybyname_resp_maxtotallat,
     {"fldb_getentrybyname_resp_maxtotallat",
      "fldb.getentrybyname_resp_maxtotallat", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_hardmaxtotlat,
     {"fldb_getentrybyname_resp_hardmaxtotlat",
      "fldb.getentrybyname_resp_hardmaxtotlat", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_minpouncedally,
     {"fldb_getentrybyname_resp_minpouncedally",
      "fldb.getentrybyname_resp_minpouncedally", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_defaultmaxreplat,
     {"fldb_getentrybyname_resp_defaultmaxreplat",
      "fldb.getentrybyname_resp_defaultmaxreplat", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_reclaimdally,
     {"fldb_getentrybyname_resp_reclaimdally",
      "fldb.getentrybyname_resp_reclaimdally", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_whenlocked,
     {"fldb_getentrybyname_resp_whenlocked",
      "fldb.getentrybyname_resp_whenlocked", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_spare1,
     {"fldb_getentrybyname_resp_spare1",
      "fldb.getentrybyname_resp_spare1", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_spare2,
     {"fldb_getentrybyname_resp_spare2",
      "fldb.getentrybyname_resp_spare2", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_spare3,
     {"fldb_getentrybyname_resp_spare3",
      "fldb.getentrybyname_resp_spare3", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_spare4,
     {"fldb_getentrybyname_resp_spare4",
      "fldb.getentrybyname_resp_spare4", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_key_t,
     {"fldb_getentrybyname_resp_key_t",
      "fldb.getentrybyname_resp_key_t", FT_STRING, BASE_NONE, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_key_size,
     {"fldb_getentrybyname_resp_key_size",
      "fldb.getentrybyname_resp_key_size", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_getentrybyname_resp_test,
     {"fldb_getentrybyname_resp_test", "fldb.getentrybyname_resp_test",
      FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}},
#endif
    {&hf_fldb_releaselock_rqst_fsid_high,
     {"FSID releaselock Hi", "fldb.releaselock_rqst_fsid_high", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_opnum,
     {"Operation", "fldb.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_volumename,
     {"VolumeName", "fldb.vldbentry.volumename", FT_STRING, BASE_NONE, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_volumetype,
     {"VolumeType", "fldb.vldbentry.volumetype", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_nservers,
     {"Number of Servers", "fldb.vldbentry.nservers", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_afsnetaddr_type,
     {"Type", "fldb.afsnetaddr.type", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_afsnetaddr_data,
     {"IP Data", "fldb.afsnetaddr.data", FT_UINT8, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_sitepartition,
     {"Site Partition", "fldb.vldbentry.sitepartition", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_siteflags,
     {"Site Flags", "fldb.vldbentry.siteflags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_sitemaxreplicalatency,
     {"Site Max Replica Latench", "fldb.vldbentry.sitemaxreplatency", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_siteprincipal,
     {"Principal Name", "fldb.vldbentry.siteprincipal", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_siteowner,
     {"Site Owner", "fldb.vldbentry.siteowner", FT_GUID, BASE_NONE, NULL, 0x0,
      "UUID", HFILL}},
    {&hf_fldb_vldbentry_siteobjid,
     {"Site Object ID", "fldb.vldbentry.siteobjid", FT_GUID, BASE_NONE, NULL,
      0x0, "UUID", HFILL}},
    {&hf_fldb_vldbentry_volids_high,
     {"VolIDs high", "fldb.vldbentry.volidshigh", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_volids_low,
     {"VolIDs low", "fldb.vldbentry.volidslow", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_voltypes,
     {"VolTypes", "fldb.vldbentry.voltypes", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_cloneid_high,
     {"CloneID High", "fldb.vldbentry.cloneidhigh", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_cloneid_low,
     {"CloneID Low", "fldb.vldbentry.cloneidlow", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_afsflags_flags,
     {"AFS Flags", "fldb.vldbentry.afsflags", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_maxtotallatency,
     {"Max Total Latency", "fldb.vldbentry.maxtotallatency", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_hardmaxtotallatency,
     {"Hard Max Total Latency", "fldb.vldbentry.hardmaxtotallatency", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_minimumpouncedally,
     {"Minimum Pounce Dally", "fldb.vldbentry.minimumpouncedally", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_defaultmaxreplicalatency,
     {"Default Max Replica Latency", "fldb.vldbentry.defaultmaxreplicalatency",
      FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_reclaimdally,
     {"Reclaim Dally", "fldb.vldbentry.reclaimdally", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_vldbentry_whenlocked,
     {"When Locked", "fldb.vldbentry.whenlocked", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_spare1,
     {"Spare 1", "fldb.vldbentry.spare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_spare2,
     {"Spare 2", "fldb.vldbentry.spare2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_spare3,
     {"Spare 3", "fldb.vldbentry.spare3", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_spare4,
     {"Spare 4", "fldb.vldbentry.spare4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vldbentry_lockername,
     {"Locker Name", "fldb.vldbentry.lockername", FT_STRING, BASE_NONE, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vldbentry_charspares,
     {"Char Spares", "fldb.vldbentry.charspares", FT_STRING, BASE_NONE, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_vlconf_cell_name,
     {"Name", "fldb.vlconf.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_cellid_high,
     {"CellID High", "fldb.vlconf.cellidhigh", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vlconf_cell_cellid_low,
     {"CellID Low", "fldb.vlconf.cellidlow", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vlconf_cell_numservers,
     {"Number of Servers", "fldb.vlconf.numservers", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_hostname,
     {"hostName", "fldb.vlconf.hostname", FT_STRING, BASE_NONE, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_vlconf_cell_spare1,
     {"Spare1", "fldb.vlconf.spare1", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_spare2,
     {"Spare2", "fldb.vlconf.spare2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_spare3,
     {"Spare3", "fldb.vlconf.spare3", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_spare4,
     {"Spare4", "fldb.vlconf.spare4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_vlconf_cell_spare5,
     {"Spare5", "fldb.vlconf.spare5", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_flagsp,
     {"flagsp", "fldb.flagsp", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_nextstartp,
     {"nextstartp", "fldb.nextstartp", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_afsNameString_t_principalName_size,
     {"Principal Name Size", "fldb.principalName_size", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#if 0
    {&hf_fldb_afsNameString_t_principalName_size2,
     {"Principal Name Size2", "fldb.principalName_size2", FT_UINT32, BASE_DEC,
      NULL, 0x0, NULL, HFILL}},
#endif
    {&hf_fldb_afsNameString_t_principalName_string,
     {"Principal Name", "fldb.NameString_principal", FT_STRING, BASE_NONE,
      NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_namestring,
     {"Name string", "fldb.NameString", FT_STRING, BASE_NONE, NULL,
      0x0, NULL, HFILL}},
#if 0
    {&hf_dcerpc_error_status,
     {"Error Status", "fldb.error_status", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
#endif
    {&hf_error_st,
     {"Error Status 2", "fldb.error_st", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_creationquota,
     {"creation quota", "fldb.creationquota", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_creationuses,
     {"creation uses", "fldb.creationuses", FT_UINT32, BASE_DEC, NULL, 0x0,
      NULL, HFILL}},
    {&hf_fldb_deletedflag,
     {"deletedflag", "fldb.deletedflag", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
#if 0
    {&hf_fldb_getentrybyname_rqst_key_size,
     {"getentrybyname", "fldb.getentrybyname_rqst_key_size", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_getentrybyname_rqst_var1,
     {"getentrybyname var1", "fldb.getentrybyname_rqst_var1", FT_UINT32,
      BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_namestring_size,
     {"namestring size", "fldb.namestring_size", FT_UINT32, BASE_DEC, NULL,
      0x0, NULL, HFILL}},
#endif
    {&hf_fldb_numwanted,
     {"number wanted", "fldb.numwanted", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_spare2,
     {"spare2", "fldb.spare2", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_spare3,
     {"spare3", "fldb.spare3", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_spare4,
     {"spare4", "fldb.spare4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_spare5,
     {"spare5", "fldb.spare5", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
    {&hf_fldb_uuid_objid,
     {"objid", "fldb.uuid_objid", FT_GUID, BASE_NONE, NULL, 0x0, "UUID",
      HFILL}},
    {&hf_fldb_uuid_owner,
     {"owner", "fldb.uuid_owner", FT_GUID, BASE_NONE, NULL, 0x0, "UUID",
      HFILL}},
    {&hf_fldb_volid_high,
     {"volid high", "fldb.volid_high", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_volid_low,
     {"volid low", "fldb.volid_low", FT_UINT32, BASE_DEC, NULL, 0x0, NULL,
      HFILL}},
    {&hf_fldb_voltype,
     {"voltype", "fldb.voltype", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}},
  };

  static int *ett[] = {
    &ett_fldb,
    &ett_fldb_vldbentry,
    &ett_fldb_afsnetaddr,
    &ett_fldb_siteflags,
    &ett_fldb_afsflags,
    &ett_fldb_vlconf_cell,
    &ett_fldb_afsNameString_t,
  };

  proto_fldb = proto_register_protocol ("DCE DFS Fileset Location Server", "FLDB", "fldb");
  proto_register_field_array (proto_fldb, hf, array_length (hf));
  proto_register_subtree_array (ett, array_length (ett));
}


void
proto_reg_handoff_fldb (void)
{
  /* Register the protocol as dcerpc */
  dcerpc_init_uuid (proto_fldb, ett_fldb, &uuid_fldb, ver_fldb,
                    fldb_dissectors, hf_fldb_opnum);
}

/*
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
 *
 * Local Variables:
 * c-basic-offset: 2
 * tab-width: 8
 * indent-tabs-mode: nil
 * End:
 *
 * ex: set shiftwidth=2 tabstop=8 expandtab:
 * :indentSize=2:tabSize=8:noTabs=true:
 */