summaryrefslogtreecommitdiffstats
path: root/librpc/gen_ndr/netlogon.h
blob: 234ea10ff3d37b71bccae61ad5b9fd161f58a07d (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
/* header auto-generated by pidl */

#include <stdint.h>

#include "libcli/util/ntstatus.h"

#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/samr.h"
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/nbt.h"
#define netr_DeltaEnum8Bit netr_DeltaEnum
#define netr_SamDatabaseID8Bit netr_SamDatabaseID
#ifndef _HEADER_netlogon
#define _HEADER_netlogon

#define NETLOGON_NEG_128BIT	( NETLOGON_NEG_STRONG_KEYS )
#define NETLOGON_NEG_SCHANNEL	( NETLOGON_NEG_AUTHENTICATED_RPC )
#define DSGETDC_VALID_FLAGS	( (DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME) )
#define DS_GFTI_UPDATE_TDO	( 0x1 )
struct netr_UasInfo {
	const char *account_name;/* [unique,charset(UTF16)] */
	uint32_t priv;
	uint32_t auth_flags;
	uint32_t logon_count;
	uint32_t bad_pw_count;
	time_t last_logon;
	time_t last_logoff;
	time_t logoff_time;
	time_t kickoff_time;
	uint32_t password_age;
	time_t pw_can_change;
	time_t pw_must_change;
	const char *computer;/* [unique,charset(UTF16)] */
	const char *domain;/* [unique,charset(UTF16)] */
	const char *script_path;/* [unique,charset(UTF16)] */
	uint32_t unknown;
};

struct netr_UasLogoffInfo {
	uint32_t duration;
	uint16_t logon_count;
};

struct netr_AcctLockStr {
	int64_t lockout_duration;
	uint64_t reset_count;
	uint32_t bad_attempt_lockout;
	uint32_t dummy;
}/* [public] */;

/* bitmap netr_LogonParameterControl */
#define MSV1_0_CLEARTEXT_PASSWORD_ALLOWED ( 0x00000002 )
#define MSV1_0_UPDATE_LOGON_STATISTICS ( 0x00000004 )
#define MSV1_0_RETURN_USER_PARAMETERS ( 0x00000008 )
#define MSV1_0_DONT_TRY_GUEST_ACCOUNT ( 0x00000010 )
#define MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT ( 0x00000020 )
#define MSV1_0_RETURN_PASSWORD_EXPIRY ( 0x00000040 )
#define MSV1_0_USE_CLIENT_CHALLENGE ( 0x00000080 )
#define MSV1_0_TRY_GUEST_ACCOUNT_ONLY ( 0x00000100 )
#define MSV1_0_RETURN_PROFILE_PATH ( 0x00000200 )
#define MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY ( 0x00000400 )
#define MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT ( 0x00000800 )
#define MSV1_0_DISABLE_PERSONAL_FALLBACK ( 0x00001000 )
#define MSV1_0_ALLOW_FORCE_GUEST ( 0x00002000 )
#define MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED ( 0x00004000 )
#define MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY ( 0x00008000 )
#define MSV1_0_ALLOW_MSVCHAPV2 ( 0x00010000 )
#define MSV1_0_S4U2SELF ( 0x00020000 )
#define MSV1_0_CHECK_LOGONHOURS_FOR_S4U ( 0x00040000 )
#define MSV1_0_SUBAUTHENTICATION_DLL_EX ( 0x00100000 )

struct netr_IdentityInfo {
	struct lsa_String domain_name;
	uint32_t parameter_control;
	uint32_t logon_id_low;
	uint32_t logon_id_high;
	struct lsa_String account_name;
	struct lsa_String workstation;
};

struct netr_PasswordInfo {
	struct netr_IdentityInfo identity_info;
	struct samr_Password lmpassword;
	struct samr_Password ntpassword;
};

struct netr_ChallengeResponse {
	uint16_t length;
	uint16_t size;/* [value(length)] */
	uint8_t *data;/* [unique,length_is(length),size_is(length)] */
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_NetworkInfo {
	struct netr_IdentityInfo identity_info;
	uint8_t challenge[8];
	struct netr_ChallengeResponse nt;
	struct netr_ChallengeResponse lm;
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_GenericInfo {
	struct netr_IdentityInfo identity_info;
	struct lsa_String package_name;
	uint32_t length;
	uint8_t *data;/* [unique,size_is(length)] */
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

enum netr_LogonInfoClass
#ifndef USE_UINT_ENUMS
 {
	NetlogonInteractiveInformation=1,
	NetlogonNetworkInformation=2,
	NetlogonServiceInformation=3,
	NetlogonGenericInformation=4,
	NetlogonInteractiveTransitiveInformation=5,
	NetlogonNetworkTransitiveInformation=6,
	NetlogonServiceTransitiveInformation=7
}
#else
 { __donnot_use_enum_netr_LogonInfoClass=0x7FFFFFFF}
#define NetlogonInteractiveInformation ( 1 )
#define NetlogonNetworkInformation ( 2 )
#define NetlogonServiceInformation ( 3 )
#define NetlogonGenericInformation ( 4 )
#define NetlogonInteractiveTransitiveInformation ( 5 )
#define NetlogonNetworkTransitiveInformation ( 6 )
#define NetlogonServiceTransitiveInformation ( 7 )
#endif
;

union netr_LogonLevel {
	struct netr_PasswordInfo *password;/* [unique,case(NetlogonInteractiveInformation)] */
	struct netr_NetworkInfo *network;/* [unique,case(NetlogonNetworkInformation)] */
	struct netr_GenericInfo *generic;/* [unique,case(NetlogonGenericInformation)] */
}/* [public,switch_type(netr_LogonInfoClass)] */;

struct netr_UserSessionKey {
	uint8_t key[16];
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_LMSessionKey {
	uint8_t key[8];
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;

/* bitmap netr_UserFlags */
#define NETLOGON_GUEST ( 0x00000001 )
#define NETLOGON_NOENCRYPTION ( 0x00000002 )
#define NETLOGON_CACHED_ACCOUNT ( 0x00000004 )
#define NETLOGON_USED_LM_PASSWORD ( 0x00000008 )
#define NETLOGON_EXTRA_SIDS ( 0x00000020 )
#define NETLOGON_SUBAUTH_SESSION_KEY ( 0x00000040 )
#define NETLOGON_SERVER_TRUST_ACCOUNT ( 0x00000080 )
#define NETLOGON_NTLMV2_ENABLED ( 0x00000100 )
#define NETLOGON_RESOURCE_GROUPS ( 0x00000200 )
#define NETLOGON_PROFILE_PATH_RETURNED ( 0x00000400 )
#define NETLOGON_GRACE_LOGON ( 0x01000000 )

struct netr_SamBaseInfo {
	NTTIME last_logon;
	NTTIME last_logoff;
	NTTIME acct_expiry;
	NTTIME last_password_change;
	NTTIME allow_password_change;
	NTTIME force_password_change;
	struct lsa_String account_name;
	struct lsa_String full_name;
	struct lsa_String logon_script;
	struct lsa_String profile_path;
	struct lsa_String home_directory;
	struct lsa_String home_drive;
	uint16_t logon_count;
	uint16_t bad_password_count;
	uint32_t rid;
	uint32_t primary_gid;
	struct samr_RidWithAttributeArray groups;
	uint32_t user_flags;
	struct netr_UserSessionKey key;
	struct lsa_StringLarge logon_server;
	struct lsa_StringLarge domain;
	struct dom_sid2 *domain_sid;/* [unique] */
	struct netr_LMSessionKey LMSessKey;
	uint32_t acct_flags;
	uint32_t unknown[7];
};

struct netr_SamInfo2 {
	struct netr_SamBaseInfo base;
};

struct netr_SidAttr {
	struct dom_sid2 *sid;/* [unique] */
	uint32_t attributes;
};

struct netr_SamInfo3 {
	struct netr_SamBaseInfo base;
	uint32_t sidcount;
	struct netr_SidAttr *sids;/* [unique,size_is(sidcount)] */
}/* [public] */;

struct netr_SamInfo6 {
	struct netr_SamBaseInfo base;
	uint32_t sidcount;
	struct netr_SidAttr *sids;/* [unique,size_is(sidcount)] */
	struct lsa_String forest;
	struct lsa_String principle;
	uint32_t unknown4[20];
};

struct netr_PacInfo {
	uint32_t pac_size;
	uint8_t *pac;/* [unique,size_is(pac_size)] */
	struct lsa_String logon_domain;
	struct lsa_String logon_server;
	struct lsa_String principal_name;
	uint32_t auth_size;
	uint8_t *auth;/* [unique,size_is(auth_size)] */
	struct netr_UserSessionKey user_session_key;
	uint32_t expansionroom[10];
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
};

struct netr_GenericInfo2 {
	uint32_t length;
	uint8_t *data;/* [unique,size_is(length)] */
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

enum netr_ValidationInfoClass
#ifndef USE_UINT_ENUMS
 {
	NetlogonValidationUasInfo=1,
	NetlogonValidationSamInfo=2,
	NetlogonValidationSamInfo2=3,
	NetlogonValidationGenericInfo2=5,
	NetlogonValidationSamInfo4=6
}
#else
 { __donnot_use_enum_netr_ValidationInfoClass=0x7FFFFFFF}
#define NetlogonValidationUasInfo ( 1 )
#define NetlogonValidationSamInfo ( 2 )
#define NetlogonValidationSamInfo2 ( 3 )
#define NetlogonValidationGenericInfo2 ( 5 )
#define NetlogonValidationSamInfo4 ( 6 )
#endif
;

union netr_Validation {
	struct netr_SamInfo2 *sam2;/* [unique,case(NetlogonValidationSamInfo)] */
	struct netr_SamInfo3 *sam3;/* [unique,case(NetlogonValidationSamInfo2)] */
	struct netr_PacInfo *pac;/* [unique,case(4)] */
	struct netr_GenericInfo2 *generic;/* [unique,case(NetlogonValidationGenericInfo2)] */
	struct netr_SamInfo6 *sam6;/* [unique,case(NetlogonValidationSamInfo4)] */
}/* [public,switch_type(uint16)] */;

struct netr_Credential {
	uint8_t data[8];
}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_Authenticator {
	struct netr_Credential cred;
	time_t timestamp;
}/* [public] */;

struct netr_DELTA_DELETE_USER {
	const char *account_name;/* [unique,charset(UTF16)] */
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_USER_KEY16 {
	uint16_t length;
	uint16_t size;/* [value(length)] */
	uint32_t flags;
	struct samr_Password pwd;
};

struct netr_PasswordHistory {
	uint16_t nt_length;
	uint16_t nt_size;/* [value(nt_length)] */
	uint32_t nt_flags;
	uint16_t lm_length;
	uint16_t lm_size;/* [value(lm_length)] */
	uint32_t lm_flags;
	uint8_t *nt_history;
	uint8_t *lm_history;
};

struct netr_USER_KEYS2 {
	struct netr_USER_KEY16 lmpassword;
	struct netr_USER_KEY16 ntpassword;
	struct netr_PasswordHistory history;
};

struct netr_USER_KEY_UNION {
	struct netr_USER_KEYS2 keys2;
};

struct netr_USER_KEYS {
	uint32_t version;
	struct netr_USER_KEY_UNION keys;
}/* [public] */;

struct netr_USER_PRIVATE_INFO {
	uint8_t SensitiveDataFlag;
	uint32_t DataLength;
	uint8_t *SensitiveData;/* [unique,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(DataLength)] */
};

struct netr_DELTA_USER {
	struct lsa_String account_name;
	struct lsa_String full_name;
	uint32_t rid;
	uint32_t primary_gid;
	struct lsa_String home_directory;
	struct lsa_String home_drive;
	struct lsa_String logon_script;
	struct lsa_String description;
	struct lsa_String workstations;
	NTTIME last_logon;
	NTTIME last_logoff;
	struct samr_LogonHours logon_hours;
	uint16_t bad_password_count;
	uint16_t logon_count;
	NTTIME last_password_change;
	NTTIME acct_expiry;
	uint32_t acct_flags;
	struct samr_Password lmpassword;
	struct samr_Password ntpassword;
	uint8_t nt_password_present;
	uint8_t lm_password_present;
	uint8_t password_expired;
	struct lsa_String comment;
	struct lsa_BinaryString parameters;
	uint16_t country_code;
	uint16_t code_page;
	struct netr_USER_PRIVATE_INFO user_private_info;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String profile_path;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_DOMAIN {
	struct lsa_String domain_name;
	struct lsa_String oem_information;
	int64_t force_logoff_time;
	uint16_t min_password_length;
	uint16_t password_history_length;
	int64_t max_password_age;
	int64_t min_password_age;
	uint64_t sequence_num;
	NTTIME domain_create_time;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_BinaryString account_lockout;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t logon_to_chgpass;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_GROUP {
	struct lsa_String group_name;
	uint32_t rid;
	uint32_t attributes;
	struct lsa_String description;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_RENAME {
	struct lsa_String OldName;
	struct lsa_String NewName;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_GROUP_MEMBER {
	uint32_t *rids;/* [unique,size_is(num_rids)] */
	uint32_t *attribs;/* [unique,size_is(num_rids)] */
	uint32_t num_rids;
	uint32_t unknown1;
	uint32_t unknown2;
	uint32_t unknown3;
	uint32_t unknown4;
};

struct netr_DELTA_ALIAS {
	struct lsa_String alias_name;
	uint32_t rid;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String description;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_ALIAS_MEMBER {
	struct lsa_SidArray sids;
	uint32_t unknown1;
	uint32_t unknown2;
	uint32_t unknown3;
	uint32_t unknown4;
};

struct netr_QUOTA_LIMITS {
	uint32_t pagedpoollimit;
	uint32_t nonpagedpoollimit;
	uint32_t minimumworkingsetsize;
	uint32_t maximumworkingsetsize;
	uint32_t pagefilelimit;
	NTTIME timelimit;
};

struct netr_DELTA_POLICY {
	uint32_t maxlogsize;
	NTTIME auditretentionperiod;
	uint8_t auditingmode;
	uint32_t maxauditeventcount;
	uint32_t *eventauditoptions;/* [unique,size_is(maxauditeventcount+1)] */
	struct lsa_String primary_domain_name;
	struct dom_sid2 *sid;/* [unique] */
	struct netr_QUOTA_LIMITS quota_limits;
	uint64_t sequence_num;
	NTTIME db_create_time;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_TRUSTED_DOMAIN {
	struct lsa_String domain_name;
	uint32_t num_controllers;
	struct lsa_String *controller_names;/* [unique,size_is(num_controllers)] */
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t posix_offset;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_DELETE_TRUST {
	uint16_t unknown;
};

struct netr_DELTA_ACCOUNT {
	uint32_t privilege_entries;
	uint32_t privilege_control;
	uint32_t *privilege_attrib;/* [unique,size_is(privilege_entries)] */
	struct lsa_String *privilege_name;/* [unique,size_is(privilege_entries)] */
	struct netr_QUOTA_LIMITS quotalimits;
	uint32_t system_flags;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

struct netr_DELTA_DELETE_ACCOUNT {
	uint16_t unknown;
};

struct netr_DELTA_DELETE_SECRET {
	uint16_t unknown;
};

struct netr_CIPHER_VALUE {
	uint32_t len;
	uint32_t maxlen;
	uint8_t *cipher_data;/* [unique,length_is(len),size_is(maxlen)] */
};

struct netr_DELTA_SECRET {
	struct netr_CIPHER_VALUE current_cipher;
	NTTIME current_cipher_set_time;
	struct netr_CIPHER_VALUE old_cipher;
	NTTIME old_cipher_set_time;
	uint32_t SecurityInformation;
	struct sec_desc_buf sdbuf;
	struct lsa_String unknown1;
	struct lsa_String unknown2;
	struct lsa_String unknown3;
	struct lsa_String unknown4;
	uint32_t unknown5;
	uint32_t unknown6;
	uint32_t unknown7;
	uint32_t unknown8;
};

enum netr_DeltaEnum
#ifndef USE_UINT_ENUMS
 {
	NETR_DELTA_DOMAIN=1,
	NETR_DELTA_GROUP=2,
	NETR_DELTA_DELETE_GROUP=3,
	NETR_DELTA_RENAME_GROUP=4,
	NETR_DELTA_USER=5,
	NETR_DELTA_DELETE_USER=6,
	NETR_DELTA_RENAME_USER=7,
	NETR_DELTA_GROUP_MEMBER=8,
	NETR_DELTA_ALIAS=9,
	NETR_DELTA_DELETE_ALIAS=10,
	NETR_DELTA_RENAME_ALIAS=11,
	NETR_DELTA_ALIAS_MEMBER=12,
	NETR_DELTA_POLICY=13,
	NETR_DELTA_TRUSTED_DOMAIN=14,
	NETR_DELTA_DELETE_TRUST=15,
	NETR_DELTA_ACCOUNT=16,
	NETR_DELTA_DELETE_ACCOUNT=17,
	NETR_DELTA_SECRET=18,
	NETR_DELTA_DELETE_SECRET=19,
	NETR_DELTA_DELETE_GROUP2=20,
	NETR_DELTA_DELETE_USER2=21,
	NETR_DELTA_MODIFY_COUNT=22
}
#else
 { __donnot_use_enum_netr_DeltaEnum=0x7FFFFFFF}
#define NETR_DELTA_DOMAIN ( 1 )
#define NETR_DELTA_GROUP ( 2 )
#define NETR_DELTA_DELETE_GROUP ( 3 )
#define NETR_DELTA_RENAME_GROUP ( 4 )
#define NETR_DELTA_USER ( 5 )
#define NETR_DELTA_DELETE_USER ( 6 )
#define NETR_DELTA_RENAME_USER ( 7 )
#define NETR_DELTA_GROUP_MEMBER ( 8 )
#define NETR_DELTA_ALIAS ( 9 )
#define NETR_DELTA_DELETE_ALIAS ( 10 )
#define NETR_DELTA_RENAME_ALIAS ( 11 )
#define NETR_DELTA_ALIAS_MEMBER ( 12 )
#define NETR_DELTA_POLICY ( 13 )
#define NETR_DELTA_TRUSTED_DOMAIN ( 14 )
#define NETR_DELTA_DELETE_TRUST ( 15 )
#define NETR_DELTA_ACCOUNT ( 16 )
#define NETR_DELTA_DELETE_ACCOUNT ( 17 )
#define NETR_DELTA_SECRET ( 18 )
#define NETR_DELTA_DELETE_SECRET ( 19 )
#define NETR_DELTA_DELETE_GROUP2 ( 20 )
#define NETR_DELTA_DELETE_USER2 ( 21 )
#define NETR_DELTA_MODIFY_COUNT ( 22 )
#endif
;

union netr_DELTA_UNION {
	struct netr_DELTA_DOMAIN *domain;/* [unique,case(NETR_DELTA_DOMAIN)] */
	struct netr_DELTA_GROUP *group;/* [unique,case(NETR_DELTA_GROUP)] */
	struct netr_DELTA_RENAME *rename_group;/* [unique,case(NETR_DELTA_RENAME_GROUP)] */
	struct netr_DELTA_USER *user;/* [unique,case(NETR_DELTA_USER)] */
	struct netr_DELTA_RENAME *rename_user;/* [unique,case(NETR_DELTA_RENAME_USER)] */
	struct netr_DELTA_GROUP_MEMBER *group_member;/* [unique,case(NETR_DELTA_GROUP_MEMBER)] */
	struct netr_DELTA_ALIAS *alias;/* [unique,case(NETR_DELTA_ALIAS)] */
	struct netr_DELTA_RENAME *rename_alias;/* [unique,case(NETR_DELTA_RENAME_ALIAS)] */
	struct netr_DELTA_ALIAS_MEMBER *alias_member;/* [unique,case(NETR_DELTA_ALIAS_MEMBER)] */
	struct netr_DELTA_POLICY *policy;/* [unique,case(NETR_DELTA_POLICY)] */
	struct netr_DELTA_TRUSTED_DOMAIN *trusted_domain;/* [unique,case(NETR_DELTA_TRUSTED_DOMAIN)] */
	struct netr_DELTA_DELETE_TRUST delete_trust;/* [case(NETR_DELTA_DELETE_TRUST)] */
	struct netr_DELTA_ACCOUNT *account;/* [unique,case(NETR_DELTA_ACCOUNT)] */
	struct netr_DELTA_DELETE_ACCOUNT delete_account;/* [case(NETR_DELTA_DELETE_ACCOUNT)] */
	struct netr_DELTA_SECRET *secret;/* [unique,case(NETR_DELTA_SECRET)] */
	struct netr_DELTA_DELETE_SECRET delete_secret;/* [case(NETR_DELTA_DELETE_SECRET)] */
	struct netr_DELTA_DELETE_USER *delete_group;/* [unique,case(NETR_DELTA_DELETE_GROUP2)] */
	struct netr_DELTA_DELETE_USER *delete_user;/* [unique,case(NETR_DELTA_DELETE_USER2)] */
	uint64_t *modified_count;/* [unique,case(NETR_DELTA_MODIFY_COUNT)] */
}/* [switch_type(netr_DeltaEnum)] */;

union netr_DELTA_ID_UNION {
	uint32_t rid;/* [case(NETR_DELTA_DOMAIN)] */
	struct dom_sid2 *sid;/* [unique,case(NETR_DELTA_POLICY)] */
	const char *name;/* [unique,charset(UTF16),case(NETR_DELTA_SECRET)] */
}/* [switch_type(netr_DeltaEnum)] */;

struct netr_DELTA_ENUM {
	enum netr_DeltaEnum delta_type;
	union netr_DELTA_ID_UNION delta_id_union;/* [switch_is(delta_type)] */
	union netr_DELTA_UNION delta_union;/* [switch_is(delta_type)] */
};

struct netr_DELTA_ENUM_ARRAY {
	uint32_t num_deltas;
	struct netr_DELTA_ENUM *delta_enum;/* [unique,size_is(num_deltas)] */
};

struct netr_UAS_INFO_0 {
	uint8_t computer_name[16];
	uint32_t timecreated;
	uint32_t serial_number;
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_AccountBuffer {
	DATA_BLOB blob;/* [flag(LIBNDR_FLAG_REMAINING)] */
};

/* bitmap netr_InfoFlags */
#define NETLOGON_REPLICATION_NEEDED ( 0x00000001 )
#define NETLOGON_REPLICATION_IN_PROGRESS ( 0x00000002 )
#define NETLOGON_FULL_SYNC_REPLICATION ( 0x00000004 )
#define NETLOGON_REDO_NEEDED ( 0x00000008 )
#define NETLOGON_HAS_IP ( 0x00000010 )
#define NETLOGON_HAS_TIMESERV ( 0x00000020 )
#define NETLOGON_DNS_UPDATE_FAILURE ( 0x00000040 )
#define NETLOGON_VERIFY_STATUS_RETURNED ( 0x00000080 )

struct netr_NETLOGON_INFO_1 {
	uint32_t flags;
	WERROR pdc_connection_status;
};

struct netr_NETLOGON_INFO_2 {
	uint32_t flags;
	WERROR pdc_connection_status;
	const char *trusted_dc_name;/* [unique,charset(UTF16)] */
	WERROR tc_connection_status;
};

struct netr_NETLOGON_INFO_3 {
	uint32_t flags;
	uint32_t logon_attempts;
	uint32_t unknown1;
	uint32_t unknown2;
	uint32_t unknown3;
	uint32_t unknown4;
	uint32_t unknown5;
};

struct netr_NETLOGON_INFO_4 {
	const char *trusted_dc_name;/* [unique,charset(UTF16)] */
	const char *trusted_domain_name;/* [unique,charset(UTF16)] */
};

union netr_CONTROL_QUERY_INFORMATION {
	struct netr_NETLOGON_INFO_1 *info1;/* [unique,case] */
	struct netr_NETLOGON_INFO_2 *info2;/* [unique,case(2)] */
	struct netr_NETLOGON_INFO_3 *info3;/* [unique,case(3)] */
	struct netr_NETLOGON_INFO_4 *info4;/* [unique,case(4)] */
};

enum netr_LogonControlCode
#ifndef USE_UINT_ENUMS
 {
	NETLOGON_CONTROL_QUERY=0x00000001,
	NETLOGON_CONTROL_REPLICATE=0x00000002,
	NETLOGON_CONTROL_SYNCHRONIZE=0x00000003,
	NETLOGON_CONTROL_PDC_REPLICATE=0x00000004,
	NETLOGON_CONTROL_REDISCOVER=0x00000005,
	NETLOGON_CONTROL_TC_QUERY=0x00000006,
	NETLOGON_CONTROL_TRANSPORT_NOTIFY=0x00000007,
	NETLOGON_CONTROL_FIND_USER=0x00000008,
	NETLOGON_CONTROL_CHANGE_PASSWORD=0x00000009,
	NETLOGON_CONTROL_TC_VERIFY=0x0000000A,
	NETLOGON_CONTROL_FORCE_DNS_REG=0x0000000B,
	NETLOGON_CONTROL_QUERY_DNS_REG=0x0000000C,
	NETLOGON_CONTROL_BACKUP_CHANGE_LOG=0x0000FFFC,
	NETLOGON_CONTROL_TRUNCATE_LOG=0x0000FFFD,
	NETLOGON_CONTROL_SET_DBFLAG=0x0000FFFE,
	NETLOGON_CONTROL_BREAKPOINT=0x0000FFFF
}
#else
 { __donnot_use_enum_netr_LogonControlCode=0x7FFFFFFF}
#define NETLOGON_CONTROL_QUERY ( 0x00000001 )
#define NETLOGON_CONTROL_REPLICATE ( 0x00000002 )
#define NETLOGON_CONTROL_SYNCHRONIZE ( 0x00000003 )
#define NETLOGON_CONTROL_PDC_REPLICATE ( 0x00000004 )
#define NETLOGON_CONTROL_REDISCOVER ( 0x00000005 )
#define NETLOGON_CONTROL_TC_QUERY ( 0x00000006 )
#define NETLOGON_CONTROL_TRANSPORT_NOTIFY ( 0x00000007 )
#define NETLOGON_CONTROL_FIND_USER ( 0x00000008 )
#define NETLOGON_CONTROL_CHANGE_PASSWORD ( 0x00000009 )
#define NETLOGON_CONTROL_TC_VERIFY ( 0x0000000A )
#define NETLOGON_CONTROL_FORCE_DNS_REG ( 0x0000000B )
#define NETLOGON_CONTROL_QUERY_DNS_REG ( 0x0000000C )
#define NETLOGON_CONTROL_BACKUP_CHANGE_LOG ( 0x0000FFFC )
#define NETLOGON_CONTROL_TRUNCATE_LOG ( 0x0000FFFD )
#define NETLOGON_CONTROL_SET_DBFLAG ( 0x0000FFFE )
#define NETLOGON_CONTROL_BREAKPOINT ( 0x0000FFFF )
#endif
;

union netr_CONTROL_DATA_INFORMATION {
	const char *domain;/* [unique,charset(UTF16),case(NETLOGON_CONTROL_REDISCOVER)] */
	const char *user;/* [unique,charset(UTF16),case(NETLOGON_CONTROL_FIND_USER)] */
	uint32_t debug_level;/* [case(NETLOGON_CONTROL_SET_DBFLAG)] */
};

/* bitmap netr_NegotiateFlags */
#define NETLOGON_NEG_ACCOUNT_LOCKOUT ( 0x00000001 )
#define NETLOGON_NEG_PERSISTENT_SAMREPL ( 0x00000002 )
#define NETLOGON_NEG_ARCFOUR ( 0x00000004 )
#define NETLOGON_NEG_PROMOTION_COUNT ( 0x00000008 )
#define NETLOGON_NEG_CHANGELOG_BDC ( 0x00000010 )
#define NETLOGON_NEG_FULL_SYNC_REPL ( 0x00000020 )
#define NETLOGON_NEG_MULTIPLE_SIDS ( 0x00000040 )
#define NETLOGON_NEG_REDO ( 0x00000080 )
#define NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL ( 0x00000100 )
#define NETLOGON_NEG_SEND_PASSWORD_INFO_PDC ( 0x00000200 )
#define NETLOGON_NEG_GENERIC_PASSTHROUGH ( 0x00000400 )
#define NETLOGON_NEG_CONCURRENT_RPC ( 0x00000800 )
#define NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL ( 0x00001000 )
#define NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL ( 0x00002000 )
#define NETLOGON_NEG_STRONG_KEYS ( 0x00004000 )
#define NETLOGON_NEG_TRANSITIVE_TRUSTS ( 0x00008000 )
#define NETLOGON_NEG_DNS_DOMAIN_TRUSTS ( 0x00010000 )
#define NETLOGON_NEG_PASSWORD_SET2 ( 0x00020000 )
#define NETLOGON_NEG_GETDOMAININFO ( 0x00040000 )
#define NETLOGON_NEG_CROSS_FOREST_TRUSTS ( 0x00080000 )
#define NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION ( 0x00100000 )
#define NETLOGON_NEG_RODC_PASSTHROUGH ( 0x00200000 )
#define NETLOGON_NEG_SUPPORTS_AES_SHA2 ( 0x00400000 )
#define NETLOGON_NEG_SUPPORTS_AES ( 0x01000000 )
#define NETLOGON_NEG_AUTHENTICATED_RPC_LSASS ( 0x20000000 )
#define NETLOGON_NEG_AUTHENTICATED_RPC ( 0x40000000 )

enum SyncStateEnum
#ifndef USE_UINT_ENUMS
 {
	SYNCSTATE_NORMAL_STATE=0,
	SYNCSTATE_DOMAIN_STATE=1,
	SYNCSTATE_GROUP_STATE=2,
	SYNCSTATE_UAS_BUILT_IN_GROUP_STATE=3,
	SYNCSTATE_USER_STATE=4,
	SYNCSTATE_GROUP_MEMBER_STATE=5,
	SYNCSTATE_ALIAS_STATE=6,
	SYNCSTATE_ALIAS_MEMBER_STATE=7,
	SYNCSTATE_SAM_DONE_STATE=8
}
#else
 { __donnot_use_enum_SyncStateEnum=0x7FFFFFFF}
#define SYNCSTATE_NORMAL_STATE ( 0 )
#define SYNCSTATE_DOMAIN_STATE ( 1 )
#define SYNCSTATE_GROUP_STATE ( 2 )
#define SYNCSTATE_UAS_BUILT_IN_GROUP_STATE ( 3 )
#define SYNCSTATE_USER_STATE ( 4 )
#define SYNCSTATE_GROUP_MEMBER_STATE ( 5 )
#define SYNCSTATE_ALIAS_STATE ( 6 )
#define SYNCSTATE_ALIAS_MEMBER_STATE ( 7 )
#define SYNCSTATE_SAM_DONE_STATE ( 8 )
#endif
;

/* bitmap netr_ChangeLogFlags */
#define NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED ( 0x0001 )
#define NETR_CHANGELOG_CHANGED_PASSWORD ( 0x0002 )
#define NETR_CHANGELOG_SID_INCLUDED ( 0x0004 )
#define NETR_CHANGELOG_NAME_INCLUDED ( 0x0008 )
#define NETR_CHANGELOG_FIRST_PROMOTION_OBJ ( 0x0010 )

union netr_ChangeLogObject {
	struct dom_sid object_sid;/* [case(NETR_CHANGELOG_SID_INCLUDED)] */
	const char * object_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM),case(NETR_CHANGELOG_NAME_INCLUDED)] */
}/* [nodiscriminant] */;

struct netr_ChangeLogEntry {
	uint32_t serial_number1;
	uint32_t serial_number2;
	uint32_t object_rid;
	uint16_t flags;
	enum netr_SamDatabaseID8Bit db_index;
	enum netr_DeltaEnum8Bit delta_type;
	union netr_ChangeLogObject object;/* [switch_is(flags&(NETR_CHANGELOG_SID_INCLUDED|NETR_CHANGELOG_NAME_INCLUDED))] */
}/* [gensize,public] */;

struct netr_Blob {
	uint32_t length;
	uint8_t *data;/* [unique,size_is(length)] */
};

/* bitmap netr_DsRGetDCName_flags */
#define DS_FORCE_REDISCOVERY ( 0x00000001 )
#define DS_DIRECTORY_SERVICE_REQUIRED ( 0x00000010 )
#define DS_DIRECTORY_SERVICE_PREFERRED ( 0x00000020 )
#define DS_GC_SERVER_REQUIRED ( 0x00000040 )
#define DS_PDC_REQUIRED ( 0x00000080 )
#define DS_BACKGROUND_ONLY ( 0x00000100 )
#define DS_IP_REQUIRED ( 0x00000200 )
#define DS_KDC_REQUIRED ( 0x00000400 )
#define DS_TIMESERV_REQUIRED ( 0x00000800 )
#define DS_WRITABLE_REQUIRED ( 0x00001000 )
#define DS_GOOD_TIMESERV_PREFERRED ( 0x00002000 )
#define DS_AVOID_SELF ( 0x00004000 )
#define DS_ONLY_LDAP_NEEDED ( 0x00008000 )
#define DS_IS_FLAT_NAME ( 0x00010000 )
#define DS_IS_DNS_NAME ( 0x00020000 )
#define DS_TRY_NEXTCLOSEST_SITE ( 0x00040000 )
#define DS_DIRECTORY_SERVICE_6_REQUIRED ( 0x00080000 )
#define DS_WEB_SERVICE_REQUIRED ( 0x00100000 )
#define DS_RETURN_DNS_NAME ( 0x40000000 )
#define DS_RETURN_FLAT_NAME ( 0x80000000 )

enum netr_DsRGetDCNameInfo_AddressType
#ifndef USE_UINT_ENUMS
 {
	DS_ADDRESS_TYPE_INET=1,
	DS_ADDRESS_TYPE_NETBIOS=2
}
#else
 { __donnot_use_enum_netr_DsRGetDCNameInfo_AddressType=0x7FFFFFFF}
#define DS_ADDRESS_TYPE_INET ( 1 )
#define DS_ADDRESS_TYPE_NETBIOS ( 2 )
#endif
;

/* bitmap netr_DsR_DcFlags */
#define DS_SERVER_PDC ( NBT_SERVER_PDC )
#define DS_SERVER_GC ( NBT_SERVER_GC )
#define DS_SERVER_LDAP ( NBT_SERVER_LDAP )
#define DS_SERVER_DS ( NBT_SERVER_DS )
#define DS_SERVER_KDC ( NBT_SERVER_KDC )
#define DS_SERVER_TIMESERV ( NBT_SERVER_TIMESERV )
#define DS_SERVER_CLOSEST ( NBT_SERVER_CLOSEST )
#define DS_SERVER_WRITABLE ( NBT_SERVER_WRITABLE )
#define DS_SERVER_GOOD_TIMESERV ( NBT_SERVER_GOOD_TIMESERV )
#define DS_SERVER_NDNC ( NBT_SERVER_NDNC )
#define DS_SERVER_SELECT_SECRET_DOMAIN_6 ( NBT_SERVER_SELECT_SECRET_DOMAIN_6 )
#define DS_SERVER_FULL_SECRET_DOMAIN_6 ( NBT_SERVER_FULL_SECRET_DOMAIN_6 )
#define DS_DNS_CONTROLLER ( 0x20000000 )
#define DS_DNS_DOMAIN ( 0x40000000 )
#define DS_DNS_FOREST ( 0x80000000 )

struct netr_DsRGetDCNameInfo {
	const char *dc_unc;/* [unique,charset(UTF16)] */
	const char *dc_address;/* [unique,charset(UTF16)] */
	enum netr_DsRGetDCNameInfo_AddressType dc_address_type;
	struct GUID domain_guid;
	const char *domain_name;/* [unique,charset(UTF16)] */
	const char *forest_name;/* [unique,charset(UTF16)] */
	uint32_t dc_flags;
	const char *dc_site_name;/* [unique,charset(UTF16)] */
	const char *client_site_name;/* [unique,charset(UTF16)] */
}/* [public] */;

union netr_Capabilities {
	uint32_t server_capabilities;/* [case] */
}/* [switch_type(uint32)] */;

/* bitmap netr_TrustFlags */
#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 )
#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 )
#define NETR_TRUST_FLAG_TREEROOT ( 0x00000004 )
#define NETR_TRUST_FLAG_PRIMARY ( 0x00000008 )
#define NETR_TRUST_FLAG_NATIVE ( 0x00000010 )
#define NETR_TRUST_FLAG_INBOUND ( 0x00000020 )
#define NETR_TRUST_FLAG_MIT_KRB5 ( 0x00000080 )
#define NETR_TRUST_FLAG_AES ( 0x00000100 )

/* bitmap netr_WorkstationFlags */
#define NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS ( 0x00000001 )
#define NETR_WS_FLAG_HANDLES_SPN_UPDATE ( 0x00000002 )

/* bitmap netr_SuiteMask */
#define NETR_VER_SUITE_BACKOFFICE ( 0x0004 )
#define NETR_VER_SUITE_BLADE ( 0x0400 )
#define NETR_VER_SUITE_COMPUTE_SERVER ( 0x4000 )
#define NETR_VER_SUITE_DATACENTER ( 0x0080 )
#define NETR_VER_SUITE_ENTERPRISE ( 0x0002 )
#define NETR_VER_SUITE_EMBEDDEDNT ( 0x0040 )
#define NETR_VER_SUITE_PERSONAL ( 0x0200 )
#define NETR_VER_SUITE_SINGLEUSERTS ( 0x0100 )
#define NETR_VER_SUITE_SMALLBUSINESS ( 0x0001 )
#define NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED ( 0x0020 )
#define NETR_VER_SUITE_STORAGE_SERVER ( 0x2000 )
#define NETR_VER_SUITE_TERMINAL ( 0x0010 )
#define NETR_VER_SUITE_WH_SERVER ( 0x8000 )

/* bitmap netr_ProductType */
#define NETR_VER_NT_DOMAIN_CONTROLLER ( 0x02 )
#define NETR_VER_NT_SERVER ( 0x03 )
#define NETR_VER_NT_WORKSTATION ( 0x01 )

struct netr_LsaPolicyInformation {
	uint32_t policy_size;
	uint8_t *policy;/* [unique,size_is(policy_size)] */
};

struct netr_OsVersionInfoEx {
	uint32_t OSVersionInfoSize;/* [value(284)] */
	uint32_t MajorVersion;
	uint32_t MinorVersion;
	uint32_t BuildNumber;
	uint32_t PlatformId;
	const char * CSDVersion;/* [subcontext_size(256),subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */
	uint16_t ServicePackMajor;
	uint16_t ServicePackMinor;
	uint16_t SuiteMask;
	uint8_t ProductType;
	uint8_t Reserved;
};

struct netr_OsVersion {
	uint32_t length;/* [value(142)] */
	uint32_t dummy;/* [value(0)] */
	uint32_t size;/* [value(142)] */
	struct netr_OsVersionInfoEx os;
};

struct netr_OsVersionContainer {
	uint16_t length;/* [value(os==NULL?0:284)] */
	uint16_t size;/* [value(os==NULL?0:284)] */
	struct netr_OsVersion *os;/* [unique] */
};

struct netr_WorkstationInformation {
	struct netr_LsaPolicyInformation lsa_policy;
	const char *dns_hostname;/* [unique,charset(UTF16)] */
	const char *sitename;/* [unique,charset(UTF16)] */
	const char *dummy1;/* [unique,charset(UTF16)] */
	const char *dummy2;/* [unique,charset(UTF16)] */
	const char *dummy3;/* [unique,charset(UTF16)] */
	const char *dummy4;/* [unique,charset(UTF16)] */
	struct netr_OsVersionContainer os_version;
	struct lsa_String os_name;
	struct lsa_String dummy_string3;
	struct lsa_String dummy_string4;
	uint32_t workstation_flags;
	uint32_t dummy_long2;
	uint32_t dummy_long3;
	uint32_t dummy_long4;
};

union netr_WorkstationInfo {
	struct netr_WorkstationInformation *workstation_info;/* [unique,case] */
	struct netr_WorkstationInformation *lsa_policy_info;/* [unique,case(2)] */
};

struct netr_trust_extension {
	uint32_t length;/* [value(8)] */
	uint32_t dummy;/* [value(0)] */
	uint32_t size;/* [value(8)] */
	uint32_t flags;
	uint32_t parent_index;
	uint32_t trust_type;
	uint32_t trust_attributes;
};

struct netr_trust_extension_container {
	uint16_t length;
	uint16_t size;/* [value(length)] */
	struct netr_trust_extension *info;/* [unique] */
};

struct netr_OneDomainInfo {
	struct lsa_String domainname;
	struct lsa_String dns_domainname;
	struct lsa_String dns_forestname;
	struct GUID domain_guid;
	struct dom_sid2 *domain_sid;/* [unique] */
	struct netr_trust_extension_container trust_extension;
	struct lsa_String dummy_string2;
	struct lsa_String dummy_string3;
	struct lsa_String dummy_string4;
	uint32_t dummy_long1;
	uint32_t dummy_long2;
	uint32_t dummy_long3;
	uint32_t dummy_long4;
};

/* bitmap netr_SupportedEncTypes */
#define ENC_CRC32 ( 0x00000001 )
#define ENC_RSA_MD5 ( 0x00000002 )
#define ENC_RC4_HMAC_MD5 ( 0x00000004 )
#define ENC_HMAC_SHA1_96_AES128 ( 0x00000008 )
#define ENC_HMAC_SHA1_96_AES256 ( 0x00000010 )

struct netr_DomainInformation {
	struct netr_OneDomainInfo primary_domain;
	uint32_t trusted_domain_count;
	struct netr_OneDomainInfo *trusted_domains;/* [unique,size_is(trusted_domain_count)] */
	struct netr_LsaPolicyInformation lsa_policy;
	struct lsa_String dns_hostname;
	struct lsa_String dummy_string2;
	struct lsa_String dummy_string3;
	struct lsa_String dummy_string4;
	uint32_t workstation_flags;
	uint32_t supported_enc_types;
	uint32_t dummy_long3;
	uint32_t dummy_long4;
};

union netr_DomainInfo {
	struct netr_DomainInformation *domain_info;/* [unique,case] */
	struct netr_LsaPolicyInformation *lsa_policy_info;/* [unique,case(2)] */
};

struct netr_CryptPassword {
	uint8_t data[512];
	uint32_t length;
}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;

struct netr_DsRAddressToSitenamesWCtr {
	uint32_t count;
	struct lsa_String *sitename;/* [unique,size_is(count)] */
};

struct netr_DsRAddress {
	uint8_t *buffer;/* [unique,size_is(size)] */
	uint32_t size;
};

enum netr_TrustType
#ifndef USE_UINT_ENUMS
 {
	NETR_TRUST_TYPE_DOWNLEVEL=1,
	NETR_TRUST_TYPE_UPLEVEL=2,
	NETR_TRUST_TYPE_MIT=3,
	NETR_TRUST_TYPE_DCE=4
}
#else
 { __donnot_use_enum_netr_TrustType=0x7FFFFFFF}
#define NETR_TRUST_TYPE_DOWNLEVEL ( 1 )
#define NETR_TRUST_TYPE_UPLEVEL ( 2 )
#define NETR_TRUST_TYPE_MIT ( 3 )
#define NETR_TRUST_TYPE_DCE ( 4 )
#endif
;

/* bitmap netr_TrustAttributes */
#define NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE ( 0x00000001 )
#define NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY ( 0x00000002 )
#define NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN ( 0x00000004 )
#define NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE ( 0x00000008 )
#define NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION ( 0x00000010 )
#define NETR_TRUST_ATTRIBUTE_WITHIN_FOREST ( 0x00000020 )
#define NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL ( 0x00000040 )

struct netr_DomainTrust {
	const char *netbios_name;/* [unique,charset(UTF16)] */
	const char *dns_name;/* [unique,charset(UTF16)] */
	uint32_t trust_flags;
	uint32_t parent_index;
	enum netr_TrustType trust_type;
	uint32_t trust_attributes;
	struct dom_sid2 *sid;/* [unique] */
	struct GUID guid;
};

struct netr_DomainTrustList {
	uint32_t count;
	struct netr_DomainTrust *array;/* [unique,size_is(count)] */
};

struct netr_DsRAddressToSitenamesExWCtr {
	uint32_t count;
	struct lsa_String *sitename;/* [unique,size_is(count)] */
	struct lsa_String *subnetname;/* [unique,size_is(count)] */
};

struct DcSitesCtr {
	uint32_t num_sites;
	struct lsa_String *sites;/* [unique,size_is(num_sites)] */
};

struct netr_TrustInfo {
	uint32_t count;
	uint32_t *data;/* [unique,size_is(count)] */
	uint32_t entry_count;
	struct lsa_String *entries;/* [unique,size_is(count)] */
};


struct netr_LogonUasLogon {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		const char *workstation;/* [ref,charset(UTF16)] */
	} in;

	struct {
		struct netr_UasInfo **info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_LogonUasLogoff {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		const char *workstation;/* [ref,charset(UTF16)] */
	} in;

	struct {
		struct netr_UasLogoffInfo *info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_LogonSamLogon {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [unique] */
		enum netr_LogonInfoClass logon_level;
		union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
		uint16_t validation_level;
		struct netr_Authenticator *return_authenticator;/* [unique] */
	} in;

	struct {
		union netr_Validation *validation;/* [ref,switch_is(validation_level)] */
		uint8_t *authoritative;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [unique] */
		NTSTATUS result;
	} out;

};


struct netr_LogonSamLogoff {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [unique] */
		enum netr_LogonInfoClass logon_level;
		union netr_LogonLevel logon;/* [switch_is(logon_level)] */
		struct netr_Authenticator *return_authenticator;/* [unique] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [unique] */
		NTSTATUS result;
	} out;

};


struct netr_ServerReqChallenge {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Credential *credentials;/* [ref] */
	} in;

	struct {
		struct netr_Credential *return_credentials;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_ServerAuthenticate {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Credential *credentials;/* [ref] */
	} in;

	struct {
		struct netr_Credential *return_credentials;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_ServerPasswordSet {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		struct samr_Password *new_password;/* [ref] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DatabaseDeltas {
	struct {
		const char *logon_server;/* [ref,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		enum netr_SamDatabaseID database_id;
		uint32_t preferredmaximumlength;
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint64_t *sequence_num;/* [ref] */
	} in;

	struct {
		struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint64_t *sequence_num;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DatabaseSync {
	struct {
		const char *logon_server;/* [ref,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		enum netr_SamDatabaseID database_id;
		uint32_t preferredmaximumlength;
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint32_t *sync_context;/* [ref] */
	} in;

	struct {
		struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint32_t *sync_context;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_AccountDeltas {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator credential;
		struct netr_UAS_INFO_0 uas;
		uint32_t count;
		uint32_t level;
		uint32_t buffersize;
		struct netr_Authenticator *return_authenticator;/* [ref] */
	} in;

	struct {
		struct netr_AccountBuffer *buffer;/* [ref,subcontext(4)] */
		uint32_t *count_returned;/* [ref] */
		uint32_t *total_entries;/* [ref] */
		struct netr_UAS_INFO_0 *recordid;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_AccountSync {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator credential;
		uint32_t reference;
		uint32_t level;
		uint32_t buffersize;
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct netr_UAS_INFO_0 *recordid;/* [ref] */
	} in;

	struct {
		struct netr_AccountBuffer *buffer;/* [ref,subcontext(4)] */
		uint32_t *count_returned;/* [ref] */
		uint32_t *total_entries;/* [ref] */
		uint32_t *next_reference;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct netr_UAS_INFO_0 *recordid;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_GetDcName {
	struct {
		const char *logon_server;/* [ref,charset(UTF16)] */
		const char *domainname;/* [unique,charset(UTF16)] */
	} in;

	struct {
		const char **dcname;/* [ref,charset(UTF16)] */
		WERROR result;
	} out;

};


struct netr_LogonControl {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		enum netr_LogonControlCode function_code;
		uint32_t level;
	} in;

	struct {
		union netr_CONTROL_QUERY_INFORMATION *query;/* [ref,switch_is(level)] */
		WERROR result;
	} out;

};


struct netr_GetAnyDCName {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		const char *domainname;/* [unique,charset(UTF16)] */
	} in;

	struct {
		const char **dcname;/* [ref,charset(UTF16)] */
		WERROR result;
	} out;

};


struct netr_LogonControl2 {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		enum netr_LogonControlCode function_code;
		uint32_t level;
		union netr_CONTROL_DATA_INFORMATION *data;/* [ref,switch_is(function_code)] */
	} in;

	struct {
		union netr_CONTROL_QUERY_INFORMATION *query;/* [ref,switch_is(level)] */
		WERROR result;
	} out;

};


struct netr_ServerAuthenticate2 {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Credential *credentials;/* [ref] */
		uint32_t *negotiate_flags;/* [ref] */
	} in;

	struct {
		struct netr_Credential *return_credentials;/* [ref] */
		uint32_t *negotiate_flags;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DatabaseSync2 {
	struct {
		const char *logon_server;/* [ref,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		enum netr_SamDatabaseID database_id;
		enum SyncStateEnum restart_state;
		uint32_t preferredmaximumlength;
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint32_t *sync_context;/* [ref] */
	} in;

	struct {
		struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		uint32_t *sync_context;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DatabaseRedo {
	struct {
		const char *logon_server;/* [ref,charset(UTF16)] */
		const char *computername;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		struct netr_ChangeLogEntry change_log_entry;/* [subcontext_size(change_log_entry_size),subcontext(4)] */
		uint32_t change_log_entry_size;/* [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
	} in;

	struct {
		struct netr_DELTA_ENUM_ARRAY **delta_enum_array;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_LogonControl2Ex {
	struct {
		const char *logon_server;/* [unique,charset(UTF16)] */
		enum netr_LogonControlCode function_code;
		uint32_t level;
		union netr_CONTROL_DATA_INFORMATION *data;/* [ref,switch_is(function_code)] */
	} in;

	struct {
		union netr_CONTROL_QUERY_INFORMATION *query;/* [ref,switch_is(level)] */
		WERROR result;
	} out;

};


struct netr_NetrEnumerateTrustedDomains {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
	} in;

	struct {
		struct netr_Blob *trusted_domains_blob;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsRGetDCName {
	struct {
		const char *server_unc;/* [unique,charset(UTF16)] */
		const char *domain_name;/* [unique,charset(UTF16)] */
		struct GUID *domain_guid;/* [unique] */
		struct GUID *site_guid;/* [unique] */
		uint32_t flags;
	} in;

	struct {
		struct netr_DsRGetDCNameInfo **info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_LogonGetCapabilities {
	struct {
		const char *server_name;/* [ref,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		uint32_t query_level;
		struct netr_Authenticator *return_authenticator;/* [ref] */
	} in;

	struct {
		union netr_Capabilities *capabilities;/* [ref,switch_is(query_level)] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_NETRLOGONSETSERVICEBITS {
	struct {
		WERROR result;
	} out;

};


struct netr_LogonGetTrustRid {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *domain_name;/* [unique,charset(UTF16)] */
	} in;

	struct {
		uint32_t *rid;/* [ref] */
		WERROR result;
	} out;

};


struct netr_NETRLOGONCOMPUTESERVERDIGEST {
	struct {
		WERROR result;
	} out;

};


struct netr_NETRLOGONCOMPUTECLIENTDIGEST {
	struct {
		WERROR result;
	} out;

};


struct netr_ServerAuthenticate3 {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Credential *credentials;/* [ref] */
		uint32_t *negotiate_flags;/* [ref] */
	} in;

	struct {
		struct netr_Credential *return_credentials;/* [ref] */
		uint32_t *rid;/* [ref] */
		uint32_t *negotiate_flags;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DsRGetDCNameEx {
	struct {
		const char *server_unc;/* [unique,charset(UTF16)] */
		const char *domain_name;/* [unique,charset(UTF16)] */
		struct GUID *domain_guid;/* [unique] */
		const char *site_name;/* [unique,charset(UTF16)] */
		uint32_t flags;
	} in;

	struct {
		struct netr_DsRGetDCNameInfo **info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsRGetSiteName {
	struct {
		const char *computer_name;/* [unique,charset(UTF16)] */
	} in;

	struct {
		const char **site;/* [ref,charset(UTF16)] */
		WERROR result;
	} out;

};


struct netr_LogonGetDomainInfo {
	struct {
		const char *server_name;/* [ref,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		uint32_t level;
		union netr_WorkstationInfo *query;/* [ref,switch_is(level)] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
	} in;

	struct {
		union netr_DomainInfo *info;/* [ref,switch_is(level)] */
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_ServerPasswordSet2 {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		struct netr_CryptPassword *new_password;/* [ref] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_ServerPasswordGet {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct samr_Password *password;/* [ref] */
		WERROR result;
	} out;

};


struct netr_NETRLOGONSENDTOSAM {
	struct {
		WERROR result;
	} out;

};


struct netr_DsRAddressToSitenamesW {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		uint32_t count;/* [range(0,32000)] */
		struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */
	} in;

	struct {
		struct netr_DsRAddressToSitenamesWCtr **ctr;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsRGetDCNameEx2 {
	struct {
		const char *server_unc;/* [unique,charset(UTF16)] */
		const char *client_account;/* [unique,charset(UTF16)] */
		uint32_t mask;
		const char *domain_name;/* [unique,charset(UTF16)] */
		struct GUID *domain_guid;/* [unique] */
		const char *site_name;/* [unique,charset(UTF16)] */
		uint32_t flags;
	} in;

	struct {
		struct netr_DsRGetDCNameInfo **info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN {
	struct {
		WERROR result;
	} out;

};


struct netr_NetrEnumerateTrustedDomainsEx {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
	} in;

	struct {
		struct netr_DomainTrustList *dom_trust_list;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsRAddressToSitenamesExW {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		uint32_t count;/* [range(0,32000)] */
		struct netr_DsRAddress *addresses;/* [ref,size_is(count)] */
	} in;

	struct {
		struct netr_DsRAddressToSitenamesExWCtr **ctr;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsrGetDcSiteCoverageW {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
	} in;

	struct {
		struct DcSitesCtr **ctr;/* [ref] */
		WERROR result;
	} out;

};


struct netr_LogonSamLogonEx {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		enum netr_LogonInfoClass logon_level;
		union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
		uint16_t validation_level;
		uint32_t *flags;/* [ref] */
	} in;

	struct {
		union netr_Validation *validation;/* [ref,switch_is(validation_level)] */
		uint8_t *authoritative;/* [ref] */
		uint32_t *flags;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DsrEnumerateDomainTrusts {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		uint32_t trust_flags;
	} in;

	struct {
		struct netr_DomainTrustList *trusts;/* [ref] */
		WERROR result;
	} out;

};


struct netr_DsrDeregisterDNSHostRecords {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *domain;/* [unique,charset(UTF16)] */
		struct GUID *domain_guid;/* [unique] */
		struct GUID *dsa_guid;/* [unique] */
		const char *dns_host;/* [ref,charset(UTF16)] */
	} in;

	struct {
		WERROR result;
	} out;

};


struct netr_ServerTrustPasswordsGet {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct samr_Password *password;/* [ref] */
		struct samr_Password *password2;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_DsRGetForestTrustInformation {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *trusted_domain_name;/* [unique,charset(UTF16)] */
		uint32_t flags;
	} in;

	struct {
		struct lsa_ForestTrustInformation **forest_trust_info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_GetForestTrustInformation {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *trusted_domain_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
		uint32_t flags;
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct lsa_ForestTrustInformation **forest_trust_info;/* [ref] */
		WERROR result;
	} out;

};


struct netr_LogonSamLogonWithFlags {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *computer_name;/* [unique,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [unique] */
		enum netr_LogonInfoClass logon_level;
		union netr_LogonLevel *logon;/* [ref,switch_is(logon_level)] */
		uint16_t validation_level;
		struct netr_Authenticator *return_authenticator;/* [unique] */
		uint32_t *flags;/* [ref] */
	} in;

	struct {
		union netr_Validation *validation;/* [ref,switch_is(validation_level)] */
		uint8_t *authoritative;/* [ref] */
		struct netr_Authenticator *return_authenticator;/* [unique] */
		uint32_t *flags;/* [ref] */
		NTSTATUS result;
	} out;

};


struct netr_ServerGetTrustInfo {
	struct {
		const char *server_name;/* [unique,charset(UTF16)] */
		const char *account_name;/* [ref,charset(UTF16)] */
		enum netr_SchannelType secure_channel_type;
		const char *computer_name;/* [ref,charset(UTF16)] */
		struct netr_Authenticator *credential;/* [ref] */
	} in;

	struct {
		struct netr_Authenticator *return_authenticator;/* [ref] */
		struct samr_Password *new_owf_password;/* [ref] */
		struct samr_Password *old_owf_password;/* [ref] */
		struct netr_TrustInfo **trust_info;/* [ref] */
		NTSTATUS result;
	} out;

};

#endif /* _HEADER_netlogon */