4 uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
6 endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
8 helpstring("Active Directory Replication"),
9 pointer_default(unique)
14 /* see MS-DRSR section 5.39 */
15 typedef [public,bitmap32bit
] bitmap
{
16 DRSUAPI_DRS_ASYNC_OP
= 0x00000001,
17 DRSUAPI_DRS_GETCHG_CHECK
= 0x00000002,
18 DRSUAPI_DRS_UPDATE_NOTIFICATION
= 0x00000002,
19 DRSUAPI_DRS_ADD_REF
= 0x00000004,
20 DRSUAPI_DRS_SYNC_ALL
= 0x00000008,
21 DRSUAPI_DRS_DEL_REF
= 0x00000008,
22 DRSUAPI_DRS_WRIT_REP
= 0x00000010,
23 DRSUAPI_DRS_INIT_SYNC
= 0x00000020,
24 DRSUAPI_DRS_PER_SYNC
= 0x00000040,
25 DRSUAPI_DRS_MAIL_REP
= 0x00000080,
26 DRSUAPI_DRS_ASYNC_REP
= 0x00000100,
27 DRSUAPI_DRS_IGNORE_ERROR
= 0x00000100,
28 DRSUAPI_DRS_TWOWAY_SYNC
= 0x00000200,
29 DRSUAPI_DRS_CRITICAL_ONLY
= 0x00000400,
30 DRSUAPI_DRS_GET_ANC
= 0x00000800,
31 DRSUAPI_DRS_GET_NC_SIZE
= 0x00001000,
32 DRSUAPI_DRS_LOCAL_ONLY
= 0x00001000,
33 DRSUAPI_DRS_SYNC_BYNAME
= 0x00004000,
34 DRSUAPI_DRS_REF_OK
= 0x00004000,
35 DRSUAPI_DRS_FULL_SYNC_NOW
= 0x00008000,
36 DRSUAPI_DRS_NO_SOURCE
= 0x00008000,
37 DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS
= 0x00010000,
38 DRSUAPI_DRS_FULL_SYNC_PACKET
= 0x00020000,
39 DRSUAPI_DRS_SYNC_REQUEUE
= 0x00040000,
40 DRSUAPI_DRS_SYNC_URGENT
= 0x00080000,
41 DRSUAPI_DRS_REF_GCSPN
= 0x00100000,
42 DRSUAPI_DRS_NO_DISCARD
= 0x00100000,
43 DRSUAPI_DRS_NEVER_SYNCED
= 0x00200000,
44 DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING
= 0x00400000,
45 DRSUAPI_DRS_INIT_SYNC_NOW
= 0x00800000,
46 DRSUAPI_DRS_PREEMPTED
= 0x01000000,
47 DRSUAPI_DRS_SYNC_FORCED
= 0x02000000,
48 DRSUAPI_DRS_DISABLE_AUTO_SYNC
= 0x04000000,
49 DRSUAPI_DRS_DISABLE_PERIODIC_SYNC
= 0x08000000,
50 DRSUAPI_DRS_USE_COMPRESSION
= 0x10000000,
51 DRSUAPI_DRS_NEVER_NOTIFY
= 0x20000000,
52 DRSUAPI_DRS_SYNC_PAS
= 0x40000000,
53 DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP
= 0x80000000
58 typedef [bitmap32bit
] bitmap
{
59 DRSUAPI_SUPPORTED_EXTENSION_BASE
= 0x00000001,
60 DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION
= 0x00000002,
61 DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI
= 0x00000004,
62 DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2
= 0x00000008,
63 DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS
= 0x00000010,
64 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1
= 0x00000020,
65 DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION
= 0x00000040,
66 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY
= 0x00000080,
67 DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE
= 0x00000100,
68 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2
= 0x00000200,
69 DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION
= 0x00000400,
70 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2
= 0x00000800,
71 DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD
= 0x00001000,
72 DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND
= 0x00002000,
73 DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO
= 0x00004000,
74 DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION
= 0x00008000,
75 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01
= 0x00010000,
76 DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP
= 0x00020000,
77 DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY
= 0x00040000,
78 DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3
= 0x00080000,
79 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5
= 0x00100000,
80 DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2
= 0x00200000,
81 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6
= 0x00400000,
82 DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS
= 0x00800000,
83 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8
= 0x01000000,
84 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5
= 0x02000000,
85 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6
= 0x04000000,
87 * the following 3 have the same value
88 * repadmin.exe /bind says that
90 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3
= 0x08000000,
91 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7
= 0x08000000,
92 DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT
= 0x08000000,
93 DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS
= 0x10000000,
94 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10
= 0x20000000,
95 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2
= 0x40000000,
96 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3
= 0x80000000
97 } drsuapi_SupportedExtensions
;
99 typedef [bitmap32bit
] bitmap
{
100 DRSUAPI_SUPPORTED_EXTENSION_ADAM
= 0x00000001,
101 DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2
= 0x00000002,
102 DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN
= 0x00000004
103 } drsuapi_SupportedExtensionsExt
;
105 /* this is used by w2k */
107 drsuapi_SupportedExtensions supported_extensions
;
110 } drsuapi_DsBindInfo24
;
112 /* this is used by w2k3 */
114 drsuapi_SupportedExtensions supported_extensions
;
118 } drsuapi_DsBindInfo28
;
120 /* this is used by w2k8 */
122 drsuapi_SupportedExtensions supported_extensions
;
126 drsuapi_SupportedExtensionsExt supported_extensions_ext
;
128 } drsuapi_DsBindInfo48
;
132 [flag(NDR_REMAINING)] DATA_BLOB info;
133 } drsuapi_DsBindInfoFallBack;
136 typedef [switch_type(uint32
)] union {
137 [case(24)] drsuapi_DsBindInfo24 info24
;
138 [case(28)] drsuapi_DsBindInfo28 info28
;
139 [case(48)] drsuapi_DsBindInfo48 info48
;
140 /* [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;*/
141 } drsuapi_DsBindInfo
;
143 /* the drsuapi_DsBindInfoCtr was this before
144 * typedef [flag(NDR_PAHEX)] struct {
145 * [range(1,10000)] uint32 length;
146 * [size_is(length)] uint8 data[];
147 * } drsuapi_DsBindInfo;
149 * but we don't want the caller to manually decode this blob,
150 * so we're doing it here
154 [range(1,10000)] uint32 length
;
155 [switch_is(length
)] drsuapi_DsBindInfo info
;
156 } drsuapi_DsBindInfoCtr
;
158 /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
160 * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
162 const char *DRSUAPI_DS_BIND_GUID
= "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
164 * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
165 * as administrator and this values are also used in the destination_dsa_guid field
166 * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
168 const char *DRSUAPI_DS_BIND_GUID_W2K
= "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
169 const char *DRSUAPI_DS_BIND_GUID_W2K3
= "6afab99c-6e26-464a-975f-f58f105218bc";
171 [public] WERROR drsuapi_DsBind
(
172 [in,unique] GUID
*bind_guid
,
173 [in,out,unique] drsuapi_DsBindInfoCtr
*bind_info
,
174 [out] policy_handle
*bind_handle
179 WERROR drsuapi_DsUnbind
(
180 [in,out,ref] policy_handle
*bind_handle
188 typedef [public,gensize
] struct {
189 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier
(r
, ndr
->iconv_convenience
, ndr
->flags
)-4)] uint32 __ndr_size
;
190 [value
(ndr_size_dom_sid28
(&sid
, ndr
->flags
))] uint32 __ndr_size_sid
;
193 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
194 [charset
(UTF16
),size_is(__ndr_size_dn
+1)] uint16 dn
[];
195 } drsuapi_DsReplicaObjectIdentifier
;
197 typedef [public] bitmap
{
198 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION
= 0x00000001,
199 DRSUAPI_DS_REPLICA_SYNC_WRITEABLE
= 0x00000002,
200 DRSUAPI_DS_REPLICA_SYNC_PERIODIC
= 0x00000004,
201 DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING
= 0x00000008,
202 DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES
= 0x00000010,
203 DRSUAPI_DS_REPLICA_SYNC_FULL
= 0x00000020,
204 DRSUAPI_DS_REPLICA_SYNC_URGENT
= 0x00000040,
205 DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD
= 0x00000080,
206 DRSUAPI_DS_REPLICA_SYNC_FORCE
= 0x00000100,
207 DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE
= 0x00000200,
208 DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED
= 0x00000400,
209 DRSUAPI_DS_REPLICA_SYNC_TWO_WAY
= 0x00000800,
210 DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY
= 0x00001000,
211 DRSUAPI_DS_REPLICA_SYNC_INITIAL
= 0x00002000,
212 DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION
= 0x00004000,
213 DRSUAPI_DS_REPLICA_SYNC_ABANDONED
= 0x00008000,
214 DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS
= 0x00010000,
215 DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET
= 0x00020000,
216 DRSUAPI_DS_REPLICA_SYNC_REQUEUE
= 0x00040000,
217 DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION
= 0x00080000,
218 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA
= 0x00100000,
219 DRSUAPI_DS_REPLICA_SYNC_CRITICAL
= 0x00200000,
220 DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS
= 0x00400000,
221 DRSUAPI_DS_REPLICA_SYNC_PREEMPTED
= 0x00800000
222 } drsuapi_DsReplicaSyncOptions
;
225 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
226 GUID source_dsa_guid
;
227 [charset
(DOS
),string] uint8
*src_dsa_dns_name
; /* I assume this is related to the repsFromTo1OtherInfo dns_name */
228 drsuapi_DrsOptions options
;
229 } drsuapi_DsReplicaSyncRequest1
;
231 typedef [switch_type(uint32
)] union {
232 [case(1)] drsuapi_DsReplicaSyncRequest1 req1
;
233 } drsuapi_DsReplicaSyncRequest
;
235 WERROR drsuapi_DsReplicaSync
(
236 [in,ref] policy_handle
*bind_handle
,
238 [in,switch_is(level
)] drsuapi_DsReplicaSyncRequest
*req
247 } drsuapi_DsGetNCChangesUsnTriple
;
250 GUID source_dsa_invocation_id
;
252 } drsuapi_DsReplicaCursor
;
257 [range(0,0x100000)] uint32 count
;
259 [size_is(count
)] drsuapi_DsReplicaCursor array
[];
260 } drsuapi_DsReplicaCursor05Ctr
;
265 [ref] drsuapi_DsReplicaObjectIdentifier
*sync_req_info1
;
266 drsuapi_DsGetNCChangesUsnTriple usn1
;
267 drsuapi_DsReplicaCursor05Ctr
*coursor
;
273 } drsuapi_DsGetNCChangesRequest5
;
275 typedef [flag
(NDR_PAHEX
)] struct {
276 [range(0,10000)] uint32 length
;
277 [size_is(length
)] uint8
*byte_array
[];
278 } drsuapi_DsGetNCChangesRequest_Ctr14
;
282 drsuapi_DsGetNCChangesRequest_Ctr14 data
;
283 } drsuapi_DsGetNCChangesRequest_Ctr13
;
286 [range(0,0x100000)] uint32 count
;
287 [size_is(count
)] drsuapi_DsGetNCChangesRequest_Ctr13
*array
[];
288 } drsuapi_DsGetNCChangesRequest_Ctr12
;
293 [ref] drsuapi_DsReplicaObjectIdentifier
*sync_req_info1
;
294 drsuapi_DsGetNCChangesUsnTriple usn1
;
295 drsuapi_DsReplicaCursor05Ctr
*coursor
;
303 drsuapi_DsGetNCChangesRequest_Ctr12 ctr12
;
304 } drsuapi_DsGetNCChangesRequest8
;
306 typedef [switch_type(uint32
)] union {
307 [case(5)] drsuapi_DsGetNCChangesRequest5 req5
;
308 [case(8)] drsuapi_DsGetNCChangesRequest8 req8
;
309 } drsuapi_DsGetNCChangesRequest
;
312 drsuapi_DsReplicaCursor coursor
;
314 } drsuapi_DsReplicaCursorEx
;
319 [range(0,0x100000)] uint32 count
;
321 [size_is(count
)] drsuapi_DsReplicaCursorEx array
[];
322 } drsuapi_DsReplicaCursorEx05Ctr
;
327 drsuapi_DsReplicaObjectIdentifier
*sync_req_info1
;
328 drsuapi_DsGetNCChangesUsnTriple usn1
;
329 drsuapi_DsGetNCChangesUsnTriple usn2
;
330 drsuapi_DsReplicaCursorEx05Ctr
*coursor_ex
;
331 drsuapi_DsGetNCChangesRequest_Ctr12 ctr12
;
338 } drsuapi_DsGetNCChangesCtr6
;
341 } drsuapi_DsGetNCChangesCtr7;
343 typedef [switch_type(uint32
)] union {
344 [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6
;
345 /* [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7;*/
346 } drsuapi_DsGetNCChangesCtr
;
348 WERROR drsuapi_DsGetNCChanges
(
349 [in,ref] policy_handle
*bind_handle
,
351 [in,ref,switch_is(level
)] drsuapi_DsGetNCChangesRequest
*req
,
352 [out,ref] uint32
*level_out
,
353 [out,ref,switch_is(*level_out
)] drsuapi_DsGetNCChangesCtr
*ctr
359 DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION
= 0x00000001,
360 DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK
= 0x00000002,
361 DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE
= 0x00000004,
362 DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE
= 0x00000008,
363 DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE
= 0x00000010
364 } drsuapi_DsReplicaUpdateRefsOptions
;
367 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
368 [ref,charset
(DOS
),string] uint8
*dest_dsa_dns_name
;
370 drsuapi_DsReplicaUpdateRefsOptions options
;
371 } drsuapi_DsReplicaUpdateRefsRequest1
;
373 typedef [switch_type(uint32
)] union {
374 [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1
;
375 } drsuapi_DsReplicaUpdateRefsRequest
;
377 WERROR drsuapi_DsReplicaUpdateRefs
(
378 [in,ref] policy_handle
*bind_handle
,
380 [in,switch_is(level
)] drsuapi_DsReplicaUpdateRefsRequest req
386 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
= 0x00000001,
387 DRSUAPI_DS_REPLICA_ADD_WRITEABLE
= 0x00000002
389 } drsuapi_DsReplicaAddOptions
;
391 WERROR DRSUAPI_REPLICA_ADD
();
396 DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION
= 0x00000001,
397 DRSUAPI_DS_REPLICA_DELETE_WRITEABLE
= 0x00000002
399 } drsuapi_DsReplicaDeleteOptions
;
401 WERROR DRSUAPI_REPLICA_DEL
();
406 DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION
= 0x00000001,
407 DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE
= 0x00000002
408 } drsuapi_DsReplicaModifyOptions
;
410 WERROR DRSUAPI_REPLICA_MODIFY
();
414 WERROR DRSUAPI_VERIFY_NAMES
();
418 WERROR DRSUAPI_GET_MEMBERSHIPS
();
422 WERROR DRSUAPI_INTER_DOMAIN_MOVE
();
426 WERROR DRSUAPI_GET_NT4_CHANGELOG
();
430 typedef [v1_enum] enum {
431 DRSUAPI_DS_NAME_STATUS_OK
= 0,
432 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
= 1,
433 DRSUAPI_DS_NAME_STATUS_NOT_FOUND
= 2,
434 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
= 3,
435 DRSUAPI_DS_NAME_STATUS_NO_MAPPING
= 4,
436 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
= 5,
437 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
= 6,
438 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
= 7
439 } drsuapi_DsNameStatus
;
441 typedef [v1_enum] enum {
442 DRSUAPI_DS_NAME_FLAG_NO_FLAGS
= 0x0,
443 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
= 0x1,
444 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
= 0x2,
445 DRSUAPI_DS_NAME_FLAG_GCVERIFY
= 0x4,
446 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
= 0x8
447 } drsuapi_DsNameFlags
;
449 typedef [v1_enum] enum {
450 DRSUAPI_DS_NAME_FORMAT_UKNOWN
= 0,
451 DRSUAPI_DS_NAME_FORMAT_FQDN_1779
= 1,
452 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
= 2,
453 DRSUAPI_DS_NAME_FORMAT_DISPLAY
= 3,
454 DRSUAPI_DS_NAME_FORMAT_GUID
= 6,
455 DRSUAPI_DS_NAME_FORMAT_CANONICAL
= 7,
456 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
= 8,
457 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
= 9,
458 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
= 10,
459 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
= 11,
460 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
= 12
461 } drsuapi_DsNameFormat
;
464 [string,charset
(UTF16
)] uint16
*str
;
465 } drsuapi_DsNameString
;
468 uint32 unknown1
; /* 0x000004e4 */
469 uint32 unknown2
; /* 0x00000407 */
470 drsuapi_DsNameFlags format_flags
;
471 drsuapi_DsNameFormat format_offered
;
472 drsuapi_DsNameFormat format_desired
;
473 [range(1,10000)] uint32 count
;
474 [size_is(count
)] drsuapi_DsNameString
*names
[];
475 } drsuapi_DsNameRequest1
;
477 typedef [switch_type(uint32
)] union {
478 [case(1)] drsuapi_DsNameRequest1 req1
;
479 } drsuapi_DsNameRequest
;
482 drsuapi_DsNameStatus status
;
483 [charset
(UTF16
),string] uint16
*dns_domain_name
;
484 [charset
(UTF16
),string] uint16
*result_name
;
485 } drsuapi_DsNameInfo1
;
489 [size_is(count
)] drsuapi_DsNameInfo1
*array
[];
490 } drsuapi_DsNameCtr1
;
492 typedef [switch_type(uint32
)] union {
493 [case(1)] drsuapi_DsNameCtr1
*ctr1
;
496 WERROR drsuapi_DsCrackNames
(
497 [in,ref] policy_handle
*bind_handle
,
499 [in,ref,switch_is(level
)] drsuapi_DsNameRequest
*req
,
500 [out,ref] uint32
*level_out
,
501 [out,ref,switch_is(*level_out
)] drsuapi_DsNameCtr
*ctr
506 typedef [v1_enum] enum {
507 DRSUAPI_DS_SPN_OPERATION_ADD
= 0,
508 DRSUAPI_DS_SPN_OPERATION_REPLACE
= 1,
509 DRSUAPI_DS_SPN_OPERATION_DELETE
= 2
510 } drsuapi_DsSpnOperation
;
513 drsuapi_DsSpnOperation operation
;
515 [charset
(UTF16
),string] uint16
*object_dn
;
516 [range(0,10000)] uint32 count
;
517 [size_is(count
)] drsuapi_DsNameString
*spn_names
;
518 } drsuapi_DsWriteAccountSpnRequest1
;
520 typedef [switch_type(uint32
)] union {
521 [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1
;
522 } drsuapi_DsWriteAccountSpnRequest
;
526 } drsuapi_DsWriteAccountSpnResult1
;
528 typedef [switch_type(uint32
)] union {
529 [case(1)] drsuapi_DsWriteAccountSpnResult1 res1
;
530 } drsuapi_DsWriteAccountSpnResult
;
532 WERROR drsuapi_DsWriteAccountSpn
(
533 [in,ref] policy_handle
*bind_handle
,
535 [in,ref,switch_is(level
)] drsuapi_DsWriteAccountSpnRequest
*req
,
536 [out,ref] uint32
*level_out
,
537 [out,ref,switch_is(*level_out
)] drsuapi_DsWriteAccountSpnResult
*res
542 WERROR DRSUAPI_REMOVE_DS_SERVER
();
546 WERROR DRSUAPI_REMOVE_DS_DOMAIN
();
551 [charset
(UTF16
),string] uint16
*domain_name
; /* netbios or dns */
552 int32 level
; /* specifies the switch level for the request */
553 } drsuapi_DsGetDCInfoRequest1
;
555 typedef [switch_type(uint32
)] union {
556 [case(1)] drsuapi_DsGetDCInfoRequest1 req1
;
557 } drsuapi_DsGetDCInfoRequest
;
560 [charset
(UTF16
),string] uint16
*netbios_name
;
561 [charset
(UTF16
),string] uint16
*dns_name
;
562 [charset
(UTF16
),string] uint16
*site_name
;
563 [charset
(UTF16
),string] uint16
*computer_dn
;
564 [charset
(UTF16
),string] uint16
*server_dn
;
567 } drsuapi_DsGetDCInfo1
;
570 [range(0,10000)] uint32 count
;
571 [size_is(count
)] drsuapi_DsGetDCInfo1
*array
[];
572 } drsuapi_DsGetDCInfoCtr1
;
575 [charset
(UTF16
),string] uint16
*netbios_name
;
576 [charset
(UTF16
),string] uint16
*dns_name
;
577 [charset
(UTF16
),string] uint16
*site_name
;
578 [charset
(UTF16
),string] uint16
*site_dn
;
579 [charset
(UTF16
),string] uint16
*computer_dn
;
580 [charset
(UTF16
),string] uint16
*server_dn
;
581 [charset
(UTF16
),string] uint16
*ntds_dn
;
589 } drsuapi_DsGetDCInfo2
;
592 [range(0,10000)] uint32 count
;
593 [size_is(count
)] drsuapi_DsGetDCInfo2
*array
[];
594 } drsuapi_DsGetDCInfoCtr2
;
603 [charset
(UTF16
),string] uint16
*server_nt4_account
;
604 } drsuapi_DsGetDCInfo01
;
607 [range(0,10000)] uint32 count
;
608 [size_is(count
)] drsuapi_DsGetDCInfo01
*array
[];
609 } drsuapi_DsGetDCInfoCtr01
;
611 typedef [v1_enum] enum {
612 DRSUAPI_DC_INFO_CTR_1
= 1,
613 DRSUAPI_DC_INFO_CTR_2
= 2,
614 DRSUAPI_DC_INFO_CTR_01
= -1
615 } drsuapi_DsGetDCInfoCtrLevels
;
617 typedef [switch_type(uint32
)] union {
618 [case(DRSUAPI_DC_INFO_CTR_1
)] drsuapi_DsGetDCInfoCtr1 ctr1
;
619 [case(DRSUAPI_DC_INFO_CTR_2
)] drsuapi_DsGetDCInfoCtr2 ctr2
;
620 [case(DRSUAPI_DC_INFO_CTR_01
)] drsuapi_DsGetDCInfoCtr01 ctr01
;
621 } drsuapi_DsGetDCInfoCtr
;
623 WERROR drsuapi_DsGetDomainControllerInfo
(
624 [in,ref] policy_handle
*bind_handle
,
626 [in,ref,switch_is(level
)] drsuapi_DsGetDCInfoRequest
*req
,
627 [out,ref] uint32
*level_out
,
628 [out,ref,switch_is(*level_out
)] drsuapi_DsGetDCInfoCtr
*ctr
633 WERROR drsuapi_DsAddEntry
();
638 DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION
= 0x00000001,
639 DRSUAPI_DS_EXECUTE_KCC_DAMPED
= 0x00000002
640 } drsuapi_DsExecuteKCCFlags
;
644 drsuapi_DsExecuteKCCFlags flags
;
645 } drsuapi_DsExecuteKCC1
;
647 typedef [switch_type(uint32
)] union {
648 [case(1)] drsuapi_DsExecuteKCC1 ctr1
;
649 } drsuapi_DsExecuteKCCRequest
;
651 WERROR drsuapi_DsExecuteKCC
(
652 [in] policy_handle
*bind_handle
,
654 [in, ref, switch_is(level
)] drsuapi_DsExecuteKCCRequest
*req
659 typedef [v1_enum] enum {
660 DRSUAPI_DS_REPLICA_GET_INFO
= 1,
661 DRSUAPI_DS_REPLICA_GET_INFO2
= 2
662 } drsuapi_DsReplicaGetInfoLevel
;
664 typedef [v1_enum] enum {
665 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
= 0,
666 DRSUAPI_DS_REPLICA_INFO_CURSORS
= 1,
667 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
= 2,
668 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
= 3,
669 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
= 4,
670 DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
= 5,
671 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
= 6,
672 DRSUAPI_DS_REPLICA_INFO_CURSORS2
= 7,
673 DRSUAPI_DS_REPLICA_INFO_CURSORS3
= 8,
674 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
= 9,
675 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
= 10,
676 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
= -2,
677 DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
= -4,
678 DRSUAPI_DS_REPLICA_INFO_CURSURS05
= -5,
679 DRSUAPI_DS_REPLICA_INFO_06
= -6
680 } drsuapi_DsReplicaInfoType
;
683 drsuapi_DsReplicaInfoType info_type
;
684 [charset
(UTF16
),string] uint16
*object_dn
;
686 } drsuapi_DsReplicaGetInfoRequest1
;
689 drsuapi_DsReplicaInfoType info_type
;
690 [charset
(UTF16
),string] uint16
*object_dn
;
693 [charset
(UTF16
),string] uint16
*string1
;
694 [charset
(UTF16
),string] uint16
*string2
;
696 } drsuapi_DsReplicaGetInfoRequest2
;
698 typedef [switch_type(drsuapi_DsReplicaGetInfoLevel
)] union {
699 [case(DRSUAPI_DS_REPLICA_GET_INFO
)] drsuapi_DsReplicaGetInfoRequest1 req1
;
700 [case(DRSUAPI_DS_REPLICA_GET_INFO2
)] drsuapi_DsReplicaGetInfoRequest2 req2
;
701 } drsuapi_DsReplicaGetInfoRequest
;
704 [charset
(UTF16
),string] uint16
*naming_context_dn
;
705 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
706 [charset
(UTF16
),string] uint16
*source_dsa_address
;
707 [charset
(UTF16
),string] uint16
*transport_obj_dn
;
708 uint32 replica_flags
;
710 GUID naming_context_obj_guid
;
711 GUID source_dsa_obj_guid
;
712 GUID source_dsa_invocation_id
;
713 GUID transport_obj_guid
;
714 uint64 tmp_highest_usn
;
718 WERROR result_last_attempt
;
719 uint32 consecutive_sync_failures
;
720 } drsuapi_DsReplicaNeighbour
;
725 [size_is(count
)] drsuapi_DsReplicaNeighbour array
[];
726 } drsuapi_DsReplicaNeighbourCtr
;
731 [size_is(count
)] drsuapi_DsReplicaCursor array
[];
732 } drsuapi_DsReplicaCursorCtr
;
735 [charset
(UTF16
),string] uint16
*attribute_name
;
737 NTTIME originating_last_changed
;
738 GUID originating_dsa_invocation_id
;
739 uint64 originating_usn
;
741 } drsuapi_DsReplicaObjMetaData
;
746 [size_is(count
)] drsuapi_DsReplicaObjMetaData array
[];
747 } drsuapi_DsReplicaObjMetaDataCtr
;
750 [charset
(UTF16
),string] uint16
*dsa_obj_dn
;
752 NTTIME first_failure
;
755 } drsuapi_DsReplicaKccDsaFailure
;
760 [size_is(count
)] drsuapi_DsReplicaKccDsaFailure array
[];
761 } drsuapi_DsReplicaKccDsaFailuresCtr
;
764 DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
= 0,
765 DRSUAPI_DS_REPLICA_OP_TYPE_ADD
= 1,
766 DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
= 2,
767 DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
= 3,
768 DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
= 4
769 } drsuapi_DsReplicaOpType
;
771 typedef [switch_type(drsuapi_DsReplicaOpType
)] union {
772 [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
)] drsuapi_DsReplicaSyncOptions sync
;
773 [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD
)] drsuapi_DsReplicaAddOptions add
;
774 [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
)] drsuapi_DsReplicaDeleteOptions delete
;
775 [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
)] drsuapi_DsReplicaModifyOptions modify
;
776 [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
)] drsuapi_DsReplicaUpdateRefsOptions update_refs
;
777 [default] uint32 unknown
;
778 } drsuapi_DsRplicaOpOptions
;
781 NTTIME operation_start
;
782 uint32 serial_num
; /* unique till reboot */
784 drsuapi_DsReplicaOpType operation_type
;
785 [switch_is(operation_type
)] drsuapi_DsRplicaOpOptions options
;
786 [charset
(UTF16
),string] uint16
*nc_dn
;
787 [charset
(UTF16
),string] uint16
*remote_dsa_obj_dn
;
788 [charset
(UTF16
),string] uint16
*remote_dsa_address
;
790 GUID remote_dsa_obj_guid
;
791 } drsuapi_DsReplicaOp
;
796 [size_is(count
)] drsuapi_DsReplicaOp array
[];
797 } drsuapi_DsReplicaOpCtr
;
800 [charset
(UTF16
),string] uint16
*attribute_name
;
801 [charset
(UTF16
),string] uint16
*object_dn
;
803 [size_is(value_length
)] uint8
*value
[];
807 NTTIME originating_last_changed
;
808 GUID originating_dsa_invocation_id
;
809 uint64 originating_usn
;
811 } drsuapi_DsReplicaAttrValMetaData
;
815 int32 enumeration_context
;
816 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData array
[];
817 } drsuapi_DsReplicaAttrValMetaDataCtr
;
820 GUID source_dsa_invocation_id
;
822 NTTIME last_sync_success
;
823 } drsuapi_DsReplicaCursor2
;
827 int32 enumeration_context
;
828 [size_is(count
)] drsuapi_DsReplicaCursor2 array
[];
829 } drsuapi_DsReplicaCursor2Ctr
;
832 GUID source_dsa_invocation_id
;
834 NTTIME last_sync_success
;
835 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
836 } drsuapi_DsReplicaCursor3
;
840 int32 enumeration_context
;
841 [size_is(count
)] drsuapi_DsReplicaCursor3 array
[];
842 } drsuapi_DsReplicaCursor3Ctr
;
845 [charset
(UTF16
),string] uint16
*attribute_name
;
847 NTTIME originating_last_changed
;
848 GUID originating_dsa_invocation_id
;
849 uint64 originating_usn
;
851 [charset
(UTF16
),string] uint16
*originating_dsa_obj_dn
;
852 } drsuapi_DsReplicaObjMetaData2
;
856 int32 enumeration_context
;
857 [size_is(count
)] drsuapi_DsReplicaObjMetaData2 array
[];
858 } drsuapi_DsReplicaObjMetaData2Ctr
;
861 [charset
(UTF16
),string] uint16
*attribute_name
;
862 [charset
(UTF16
),string] uint16
*object_dn
;
864 [size_is(value_length
)] uint8
*value
[];
868 NTTIME originating_last_changed
;
869 GUID originating_dsa_invocation_id
;
870 uint64 originating_usn
;
872 [charset
(UTF16
),string] uint16
*originating_dsa_obj_dn
;
873 } drsuapi_DsReplicaAttrValMetaData2
;
877 int32 enumeration_context
;
878 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData2 array
[];
879 } drsuapi_DsReplicaAttrValMetaData2Ctr
;
882 uint64 u1
; /* session number? */
886 NTTIME_1sec bind_time
;
887 uint32 u4
; /* flags? */
889 } drsuapi_DsReplicaConnection04
;
892 [range(0,10000)] uint32 count
;
894 [size_is(count
)] drsuapi_DsReplicaConnection04 array
[];
895 } drsuapi_DsReplicaConnection04Ctr
;
898 [charset
(UTF16
),string] uint16
*str1
;
906 } drsuapi_DsReplica06
;
909 [range(0,256)] uint32 count
;
911 [size_is(count
)] drsuapi_DsReplica06 array
[];
912 } drsuapi_DsReplica06Ctr
;
914 typedef [switch_type(drsuapi_DsReplicaInfoType
)] union {
915 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
)] drsuapi_DsReplicaNeighbourCtr
*neighbours
;
916 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS
)] drsuapi_DsReplicaCursorCtr
*coursors
;
917 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
)] drsuapi_DsReplicaObjMetaDataCtr
*objmetadata
;
918 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*connectfailures
;
919 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*linkfailures
;
920 [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
)] drsuapi_DsReplicaOpCtr
*pendingops
;
921 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
)] drsuapi_DsReplicaAttrValMetaDataCtr
*attrvalmetadata
;
922 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2
)] drsuapi_DsReplicaCursor2Ctr
*coursors2
;
923 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3
)] drsuapi_DsReplicaCursor3Ctr
*coursors3
;
924 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
)] drsuapi_DsReplicaObjMetaData2Ctr
*objmetadata2
;
925 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
)] drsuapi_DsReplicaAttrValMetaData2Ctr
*attrvalmetadata2
;
926 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
)] drsuapi_DsReplicaNeighbourCtr
*neighbours02
;
927 [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
)] drsuapi_DsReplicaConnection04Ctr
*connections04
;
928 [case(DRSUAPI_DS_REPLICA_INFO_CURSURS05
)] drsuapi_DsReplicaCursor05Ctr
*coursors05
;
929 [case(DRSUAPI_DS_REPLICA_INFO_06
)] drsuapi_DsReplica06Ctr
*i06
;
930 } drsuapi_DsReplicaInfo
;
932 WERROR drsuapi_DsReplicaGetInfo
(
933 [in,ref] policy_handle
*bind_handle
,
934 [in] drsuapi_DsReplicaGetInfoLevel level
,
935 [in,ref,switch_is(level
)] drsuapi_DsReplicaGetInfoRequest
*req
,
936 [out,ref] drsuapi_DsReplicaInfoType
*info_type
,
937 [out,ref,switch_is(*info_type
)] drsuapi_DsReplicaInfo
*info
942 WERROR DRSUAPI_ADD_SID_HISTORY
();
946 WERROR DRSUAPI_GET_MEMBERSHIPS2
();
950 WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS
();
954 WERROR DRSUAPI_GET_OBJECT_EXISTENCE
();
958 WERROR DRSUAPI_QUERY_SITES_BY_COST
();