3 import
"security.idl", "misc.idl", "samr.idl";
6 uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
8 endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
10 helpstring("Active Directory Replication"),
11 helper
("librpc/ndr/ndr_drsuapi.h"),
12 pointer_default(unique)
16 typedef bitmap samr_GroupAttrs samr_GroupAttrs
;
20 typedef [bitmap32bit
] bitmap
{
21 DRSUAPI_SUPPORTED_EXTENSION_BASE
= 0x00000001,
22 DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION
= 0x00000002,
23 DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI
= 0x00000004,
24 DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2
= 0x00000008,
25 DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS
= 0x00000010,
26 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1
= 0x00000020,
27 DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION
= 0x00000040,
28 DRSUAPI_SUPPORTED_EXTENSION_00000080
= 0x00000080,
29 DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE
= 0x00000100,
30 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2
= 0x00000200,
31 DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION
= 0x00000400,
32 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2
= 0x00000800,
33 DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD
= 0x00001000,
34 DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND
= 0x00002000,
35 DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO
= 0x00004000,
36 DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION
= 0x00008000,
37 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01
= 0x00010000,
38 DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP
= 0x00020000,
39 DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY
= 0x00040000,
40 DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3
= 0x00080000,
41 DRSUAPI_SUPPORTED_EXTENSION_00100000
= 0x00100000,
42 DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2
= 0x00200000,
43 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6
= 0x00400000,
44 DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS
= 0x00800000,
45 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8
= 0x01000000,
46 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5
= 0x02000000,
47 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6
= 0x04000000,
49 * the following 3 have the same value
50 * repadmin.exe /bind says that
52 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3
= 0x08000000,
53 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7
= 0x08000000,
54 DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT
= 0x08000000,
55 DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS
= 0x10000000,
56 DRSUAPI_SUPPORTED_EXTENSION_20000000
= 0x20000000,
57 DRSUAPI_SUPPORTED_EXTENSION_40000000
= 0x40000000,
58 DRSUAPI_SUPPORTED_EXTENSION_80000000
= 0x80000000
59 } drsuapi_SupportedExtensions
;
61 typedef [bitmap32bit
] bitmap
{
62 DRSUAPI_SUPPORTED_EXTENSION_ADAM
= 0x00000001,
63 DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2
= 0x00000002
64 } drsuapi_SupportedExtensionsExt
;
66 /* this is used by w2k */
68 drsuapi_SupportedExtensions supported_extensions
;
71 } drsuapi_DsBindInfo24
;
73 /* this is used by w2k3 */
75 drsuapi_SupportedExtensions supported_extensions
;
79 } drsuapi_DsBindInfo28
;
81 /* this is used by w2k8 */
83 drsuapi_SupportedExtensions supported_extensions
;
87 drsuapi_SupportedExtensionsExt supported_extensions_ext
;
89 } drsuapi_DsBindInfo48
;
92 [flag
(NDR_REMAINING
)] DATA_BLOB info
;
93 } drsuapi_DsBindInfoFallBack
;
95 typedef [nodiscriminant
] union {
96 [case(24)][subcontext
(4)] drsuapi_DsBindInfo24 info24
;
97 [case(28)][subcontext
(4)] drsuapi_DsBindInfo28 info28
;
98 [case(48)][subcontext
(4)] drsuapi_DsBindInfo48 info48
;
99 [default][subcontext
(4)] drsuapi_DsBindInfoFallBack FallBack
;
100 } drsuapi_DsBindInfo
;
102 /* the drsuapi_DsBindInfoCtr was this before
103 * typedef [flag(NDR_PAHEX)] struct {
104 * [range(1,10000)] uint32 length;
105 * [size_is(length)] uint8 data[];
106 * } drsuapi_DsBindInfo;
108 * but we don't want the caller to manually decode this blob,
109 * so we're doing it here
113 [range(1,10000)] uint32 length
;
114 [switch_is(length
)] drsuapi_DsBindInfo info
;
115 } drsuapi_DsBindInfoCtr
;
117 /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
119 * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
121 const char *DRSUAPI_DS_BIND_GUID
= "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
123 * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
124 * as administrator and this values are also used in the destination_dsa_guid field
125 * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
127 const char *DRSUAPI_DS_BIND_GUID_W2K
= "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
128 const char *DRSUAPI_DS_BIND_GUID_W2K3
= "6afab99c-6e26-464a-975f-f58f105218bc";
130 [public] WERROR drsuapi_DsBind
(
131 [in,unique] GUID
*bind_guid
,
132 [in,out,unique] drsuapi_DsBindInfoCtr
*bind_info
,
133 [out] policy_handle
*bind_handle
138 WERROR drsuapi_DsUnbind
(
139 [in,out] policy_handle
*bind_handle
144 typedef [public,gensize
] struct {
145 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier
(r
, ndr
->flags
)-4)] uint32 __ndr_size
;
146 [value
(ndr_size_dom_sid28
(&sid
, ndr
->flags
))] uint32 __ndr_size_sid
;
149 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
150 [charset
(UTF16
),size_is(__ndr_size_dn
+1)] uint16 dn
[];
151 } drsuapi_DsReplicaObjectIdentifier
;
153 typedef [public] bitmap
{
154 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION
= 0x00000001,
155 DRSUAPI_DS_REPLICA_SYNC_WRITEABLE
= 0x00000002,
156 DRSUAPI_DS_REPLICA_SYNC_PERIODIC
= 0x00000004,
157 DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING
= 0x00000008,
158 DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES
= 0x00000010,
159 DRSUAPI_DS_REPLICA_SYNC_FULL
= 0x00000020,
160 DRSUAPI_DS_REPLICA_SYNC_URGENT
= 0x00000040,
161 DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD
= 0x00000080,
162 DRSUAPI_DS_REPLICA_SYNC_FORCE
= 0x00000100,
163 DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE
= 0x00000200,
164 DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED
= 0x00000400,
165 DRSUAPI_DS_REPLICA_SYNC_TWO_WAY
= 0x00000800,
166 DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY
= 0x00001000,
167 DRSUAPI_DS_REPLICA_SYNC_INITIAL
= 0x00002000,
168 DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION
= 0x00004000,
169 DRSUAPI_DS_REPLICA_SYNC_ABANDONED
= 0x00008000,
170 DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS
= 0x00010000,
171 DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET
= 0x00020000,
172 DRSUAPI_DS_REPLICA_SYNC_REQUEUE
= 0x00040000,
173 DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION
= 0x00080000,
174 DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA
= 0x00100000,
175 DRSUAPI_DS_REPLICA_SYNC_CRITICAL
= 0x00200000,
176 DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS
= 0x00400000,
177 DRSUAPI_DS_REPLICA_SYNC_PREEMPTED
= 0x00800000
178 } drsuapi_DsReplicaSyncOptions
;
181 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
182 GUID source_dsa_guid
;
183 astring
*other_info
; /* I assume this is related to the repsFromTo1OtherInfo dns_name */
184 drsuapi_DsReplicaSyncOptions options
;
185 } drsuapi_DsReplicaSyncRequest1
;
187 typedef [switch_type(int32
)] union {
188 [case(1)] drsuapi_DsReplicaSyncRequest1 req1
;
189 } drsuapi_DsReplicaSyncRequest
;
191 WERROR drsuapi_DsReplicaSync
(
192 [in] policy_handle
*bind_handle
,
194 [in,switch_is(level
)] drsuapi_DsReplicaSyncRequest req
199 typedef [public] struct {
200 hyper tmp_highest_usn
; /* updated after each object update */
202 hyper highest_usn
; /* updated after a full replication cycle */
203 } drsuapi_DsReplicaHighWaterMark
;
205 typedef [public] struct {
206 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
207 hyper highest_usn
; /* updated after a full replication cycle */
208 } drsuapi_DsReplicaCursor
;
211 [value
(1)] uint32
version;
212 [value
(0)] uint32 reserved1
;
213 [range(0,0x100000)] uint32 count
;
214 [value
(0)] uint32 reserved2
;
215 [size_is(count
)] drsuapi_DsReplicaCursor cursors
[];
216 } drsuapi_DsReplicaCursorCtrEx
;
218 typedef [public] bitmap
{
219 /* the _WRITEABLE flag indicates a replication with all attributes
223 DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE
= 0x00000010,
224 DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
= 0x00000020,
225 DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS
= 0x00000040,
226 DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT
= 0x00000080,
227 DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC
= 0x00000200,
228 DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
= 0x00000800,
229 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS
= 0x00001000, /* was 0x00010000, */
230 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET
= 0x00002000, /* was 0x00020000, */
231 DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
= 0x00200000,
232 DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED
= 0x01000000,
233 DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS
= 0x04000000,
234 DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC
= 0x08000000,
236 * the following NOTE applies to DsGetNCChangesRequest5:
237 * - the data is only compressed when 10 or more objects are replicated
238 * - but there could also be a size limit of 35 KBytes or something like that
239 * - the reply is DsGetNCChangesCtr2
240 * - maybe the same applies to DsGetNCChangesRequest8...
244 DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES
= 0x10000000,
245 DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS
= 0x20000000,
246 DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET
= 0x40000000
247 } drsuapi_DsReplicaNeighbourFlags
;
249 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
250 DRSUAPI_EXOP_NONE
= 0x00000000,
251 DRSUAPI_EXOP_FSMO_REQ_ROLE
= 0x00000001,
252 DRSUAPI_EXOP_FSMO_RID_ALLOC
= 0x00000002,
253 DRSUAPI_EXOP_FSMO_RID_REQ_ROLE
= 0x00000003,
254 DRSUAPI_EXOP_FSMO_REQ_PDC
= 0x00000004,
255 DRSUAPI_EXOP_FSMO_ABANDON_ROLE
= 0x00000005,
256 DRSUAPI_EXOP_REPL_OBJ
= 0x00000006,
257 DRSUAPI_EXOP_REPL_SECRET
= 0x00000007
258 } drsuapi_DsExtendedOperation
;
260 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
261 DRSUAPI_EXOP_ERR_NONE
= 0x00000000,
262 DRSUAPI_EXOP_ERR_SUCCESS
= 0x00000001,
263 DRSUAPI_EXOP_ERR_UNKNOWN_OP
= 0x00000002,
264 DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER
= 0x00000003,
265 DRSUAPI_EXOP_ERR_UPDATE_ERR
= 0x00000004,
266 DRSUAPI_EXOP_ERR_EXCEPTION
= 0x00000005,
267 DRSUAPI_EXOP_ERR_UNKNOWN_CALLER
= 0x00000006,
268 DRSUAPI_EXOP_ERR_RID_ALLOC
= 0x00000007,
269 DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED
= 0x00000008,
270 DRSUAPI_EXOP_ERR_FMSO_PENDING_OP
= 0x00000009,
271 DRSUAPI_EXOP_ERR_MISMATCH
= 0x0000000A,
272 DRSUAPI_EXOP_ERR_COULDNT_CONTACT
= 0x0000000B,
273 DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES
= 0x0000000C,
274 DRSUAPI_EXOP_ERR_DIR_ERROR
= 0x0000000D,
275 DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS
= 0x0000000E,
276 DRSUAPI_EXOP_ERR_ACCESS_DENIED
= 0x0000000F,
277 DRSUAPI_EXOP_ERR_PARAM_ERROR
= 0x00000010
278 } drsuapi_DsExtendedError
;
281 GUID destination_dsa_guid
;
282 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
283 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
284 drsuapi_DsReplicaHighWaterMark highwatermark
;
285 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
286 drsuapi_DsReplicaNeighbourFlags replica_flags
;
287 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
288 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
289 drsuapi_DsExtendedOperation extended_op
;
291 } drsuapi_DsGetNCChangesRequest5
;
294 * In DRSUAPI all attributes with syntax 2.5.5.2
295 * are identified by uint32 values
297 * the following table shows the mapping used between the two representations
298 * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
299 * and a UINT32-ID of '0x0017002F'.
300 * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
301 * OID-prefix: 1.2.840.113556.1.5.7000
302 * and a value: 47 => 0x2F
303 * - the mapping table gives a UINT32-prefix: 0x00170000
304 * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
306 * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
307 * array. The following are the default mappings of w2k3
309 * OID-prefix => UINT32-Id prefix
311 * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
312 * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
313 * 1.2.840.113556.1.2.* => 0x00020000
314 * 1.2.840.113556.1.3.* => 0x00030000
315 * 2.5.5.* => 0x00080000 (attributeSyntax OID's)
316 * 1.2.840.113556.1.4.* => 0x00090000
317 * 1.2.840.113556.1.5.* => 0x000A0000
318 * 2.16.840.1.113730.3.* => 0x00140000
319 * 0.9.2342.19200300.100.1.* => 0x00150000
320 * 2.16.840.1.113730.3.1.* => 0x00160000
321 * 1.2.840.113556.1.5.7000.* => 0x00170000
322 * 2.5.21.* => 0x00180000 (attrs for SubSchema)
323 * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
324 * 2.5.20.* => 0x001A0000
325 * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
326 * 2.16.840.1.113730.3.2.* => 0x001C0000
327 * 1.3.6.1.4.1.250.1.* => 0x001D0000
328 * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
329 * 0.9.2342.19200300.100.4.* => 0x001F0000
331 * Here's a list of used 'attributeSyntax' OID's
333 * 2.5.5.1 => Object(DS-DN) string
334 * struct drsuapi_DsObjectIdentifier3
336 * 2.5.5.2 => OID-string
337 * => all values are represented as uint32 values in drsuapi
338 * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
339 * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
340 * are returned as attribute names
342 * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
344 * 2.5.5.5 => String(IA5) case-sensitive string
346 * 2.5.5.6 => String(Numeric)
347 * => eg. internationalISDNNumber
349 * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
350 * => e.g. wellKnownObjects
356 * 2.5.5.10 => DATA_BLOB
359 * 2.5.5.11 => LDAP timestring
362 * 2.5.5.12 => String(Unicode) case-insensitive string
363 * => 'standard strings'
365 * 2.5.5.13 => Object(Presentation-Address) string
366 * => used in objectClass applicationEntity
368 * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
371 * 2.5.5.15 => ntSecurityDescriptor
375 * 2.5.5.17 => dom_sid
377 typedef [nopush
,nopull
] struct {
378 [range(0,10000),value
(ndr_size_drsuapi_DsReplicaOID_oid
(oid
, 0))] uint32 __ndr_size
;
379 [size_is(__ndr_size
),charset
(DOS
)] uint8
*oid
; /* it's encoded with asn1_write_OID_String() */
380 } drsuapi_DsReplicaOID
;
384 drsuapi_DsReplicaOID oid
;
385 } drsuapi_DsReplicaOIDMapping
;
387 typedef [public] struct {
388 [range(0,0x100000)] uint32 num_mappings
;
389 [size_is(num_mappings
)] drsuapi_DsReplicaOIDMapping
*mappings
;
390 } drsuapi_DsReplicaOIDMapping_Ctr
;
392 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
393 DRSUAPI_OBJECTCLASS_top
= 0x00010000,
394 DRSUAPI_OBJECTCLASS_classSchema
= 0x0003000d,
395 DRSUAPI_OBJECTCLASS_attributeSchema
= 0x0003000e
396 } drsuapi_DsObjectClassId
;
398 typedef [flag
(NDR_PAHEX
),v1_enum,public] enum {
399 DRSUAPI_ATTRIBUTE_objectClass
= 0x00000000,
400 DRSUAPI_ATTRIBUTE_description
= 0x0000000d,
401 DRSUAPI_ATTRIBUTE_member
= 0x0000001f,
402 DRSUAPI_ATTRIBUTE_instanceType
= 0x00020001,
403 DRSUAPI_ATTRIBUTE_whenCreated
= 0x00020002,
404 DRSUAPI_ATTRIBUTE_hasMasterNCs
= 0x0002000e,
405 DRSUAPI_ATTRIBUTE_governsID
= 0x00020016,
406 DRSUAPI_ATTRIBUTE_attributeID
= 0x0002001e,
407 DRSUAPI_ATTRIBUTE_attributeSyntax
= 0x00020020,
408 DRSUAPI_ATTRIBUTE_isSingleValued
= 0x00020021,
409 DRSUAPI_ATTRIBUTE_rangeLower
= 0x00020022,
410 DRSUAPI_ATTRIBUTE_rangeUpper
= 0x00020023,
411 DRSUAPI_ATTRIBUTE_dMDLocation
= 0x00020024,
412 DRSUAPI_ATTRIBUTE_objectVersion
= 0x0002004c,
413 DRSUAPI_ATTRIBUTE_invocationId
= 0x00020073,
414 DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly
= 0x000200a9,
415 DRSUAPI_ATTRIBUTE_adminDisplayName
= 0x000200c2,
416 DRSUAPI_ATTRIBUTE_adminDescription
= 0x000200e2,
417 DRSUAPI_ATTRIBUTE_oMSyntax
= 0x000200e7,
418 DRSUAPI_ATTRIBUTE_ntSecurityDescriptor
= 0x00020119,
419 DRSUAPI_ATTRIBUTE_searchFlags
= 0x0002014e,
420 DRSUAPI_ATTRIBUTE_lDAPDisplayName
= 0x000201cc,
421 DRSUAPI_ATTRIBUTE_name
= 0x00090001,
422 DRSUAPI_ATTRIBUTE_userAccountControl
= 0x00090008,
423 DRSUAPI_ATTRIBUTE_currentValue
= 0x0009001b,
424 DRSUAPI_ATTRIBUTE_homeDirectory
= 0x0009002c,
425 DRSUAPI_ATTRIBUTE_homeDrive
= 0x0009002d,
426 DRSUAPI_ATTRIBUTE_scriptPath
= 0x0009003e,
427 DRSUAPI_ATTRIBUTE_profilePath
= 0x0009008b,
428 DRSUAPI_ATTRIBUTE_objectSid
= 0x00090092,
429 DRSUAPI_ATTRIBUTE_schemaIDGUID
= 0x00090094,
430 DRSUAPI_ATTRIBUTE_dBCSPwd
= 0x00090037,/* lmPwdHash */
431 DRSUAPI_ATTRIBUTE_logonHours
= 0x00090040,
432 DRSUAPI_ATTRIBUTE_userWorkstations
= 0x00090056,
433 DRSUAPI_ATTRIBUTE_unicodePwd
= 0x0009005a,/* ntPwdHash */
434 DRSUAPI_ATTRIBUTE_ntPwdHistory
= 0x0009005e,
435 DRSUAPI_ATTRIBUTE_priorValue
= 0x00090064,
436 DRSUAPI_ATTRIBUTE_supplementalCredentials
= 0x0009007d,
437 DRSUAPI_ATTRIBUTE_trustAuthIncoming
= 0x00090081,
438 DRSUAPI_ATTRIBUTE_trustAuthOutgoing
= 0x00090087,
439 DRSUAPI_ATTRIBUTE_lmPwdHistory
= 0x000900a0,
440 DRSUAPI_ATTRIBUTE_sAMAccountName
= 0x000900dd,
441 DRSUAPI_ATTRIBUTE_sAMAccountType
= 0x0009012e,
442 DRSUAPI_ATTRIBUTE_fSMORoleOwner
= 0x00090171,
443 DRSUAPI_ATTRIBUTE_systemFlags
= 0x00090177,
444 DRSUAPI_ATTRIBUTE_serverReference
= 0x00090203,
445 DRSUAPI_ATTRIBUTE_serverReferenceBL
= 0x00090204,
446 DRSUAPI_ATTRIBUTE_initialAuthIncoming
= 0x0009021b,
447 DRSUAPI_ATTRIBUTE_initialAuthOutgoing
= 0x0009021c,
448 DRSUAPI_ATTRIBUTE_wellKnownObjects
= 0x0009026a,
449 DRSUAPI_ATTRIBUTE_dNSHostName
= 0x0009026b,
450 DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet
= 0x0009027f,
451 DRSUAPI_ATTRIBUTE_userPrincipalName
= 0x00090290,
452 DRSUAPI_ATTRIBUTE_groupType
= 0x000902ee,
453 DRSUAPI_ATTRIBUTE_servicePrincipalName
= 0x00090303,
454 DRSUAPI_ATTRIBUTE_objectCategory
= 0x0009030e,
455 DRSUAPI_ATTRIBUTE_gPLink
= 0x0009037b,
456 DRSUAPI_ATTRIBUTE_msDS_Behavior_Version
= 0x000905b3,
457 DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber
= 0x000906f6,
458 DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs
= 0x0009071c,
459 DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs
= 0x0009072c
460 } drsuapi_DsAttributeId
;
463 [value
(1)] uint32
version;
464 [value
(0)] uint32 reserved1
;
465 [range(1,0x100000)] uint32 num_attids
;
466 [size_is(num_attids
)] drsuapi_DsAttributeId attids
[];
467 } drsuapi_DsPartialAttributeSet
;
470 GUID destination_dsa_guid
;
471 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
472 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
473 drsuapi_DsReplicaHighWaterMark highwatermark
;
474 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
475 drsuapi_DsReplicaNeighbourFlags replica_flags
;
476 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
477 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
478 drsuapi_DsExtendedOperation extended_op
;
480 drsuapi_DsPartialAttributeSet
*partial_attribute_set
;
481 drsuapi_DsPartialAttributeSet
*partial_attribute_set_ex
;
482 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
483 } drsuapi_DsGetNCChangesRequest8
;
485 typedef [switch_type(int32
)] union {
486 [case(5)] drsuapi_DsGetNCChangesRequest5 req5
;
487 [case(8)] drsuapi_DsGetNCChangesRequest8 req8
;
488 } drsuapi_DsGetNCChangesRequest
;
490 typedef [public] struct {
491 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
492 hyper highest_usn
; /* updated after a full replication cycle */
493 NTTIME last_sync_success
;
494 } drsuapi_DsReplicaCursor2
;
497 [value
(2)] uint32
version;
498 [value
(0)] uint32 reserved1
;
499 [range(0,0x100000)] uint32 count
;
500 [value
(0)] uint32 reserved2
;
501 [size_is(count
)] drsuapi_DsReplicaCursor2 cursors
[];
502 } drsuapi_DsReplicaCursor2CtrEx
;
504 /* Generic DATA_BLOB values */
506 [range(0,10485760),value
(ndr_size_DATA_BLOB
(0,blob
,0))] uint32 __ndr_size
;
508 } drsuapi_DsAttributeValue
;
511 [range(0,10485760)] uint32 num_values
;
512 [size_is(num_values
)] drsuapi_DsAttributeValue
*values
;
513 } drsuapi_DsAttributeValueCtr
;
515 /* DN String values */
516 typedef [public,gensize
] struct {
517 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3
(r
, ndr
->flags
))] uint32 __ndr_size
;
518 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
521 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
522 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
523 } drsuapi_DsReplicaObjectIdentifier3
;
525 typedef [public,gensize
] struct {
526 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary
(r
, ndr
->flags
))] uint32 __ndr_size
;
527 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
530 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
531 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
532 [value
(binary.length
+ 4)] uint32 __ndr_size_binary
;
533 [flag
(NDR_REMAINING
)] DATA_BLOB binary
;
534 } drsuapi_DsReplicaObjectIdentifier3Binary
;
536 typedef [public] struct {
537 drsuapi_DsAttributeId attid
;
538 drsuapi_DsAttributeValueCtr value_ctr
;
539 } drsuapi_DsReplicaAttribute
;
542 [range(0,1048576)] uint32 num_attributes
;
543 [size_is(num_attributes
)] drsuapi_DsReplicaAttribute
*attributes
;
544 } drsuapi_DsReplicaAttributeCtr
;
546 typedef [public] bitmap
{
547 DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER
= 0x00000001,
548 DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC
= 0x00000002,
549 DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY
= 0x00010000
550 } drsuapi_DsReplicaObjectFlags
;
552 typedef [public] struct {
553 drsuapi_DsReplicaObjectIdentifier
*identifier
;
554 drsuapi_DsReplicaObjectFlags flags
;
555 drsuapi_DsReplicaAttributeCtr attribute_ctr
;
556 } drsuapi_DsReplicaObject
;
560 NTTIME_1sec originating_change_time
;
561 GUID originating_invocation_id
;
562 hyper originating_usn
;
563 } drsuapi_DsReplicaMetaData
;
565 typedef [public] struct {
566 [range(0,1048576)] uint32 count
;
567 [size_is(count
)] drsuapi_DsReplicaMetaData meta_data
[];
568 } drsuapi_DsReplicaMetaDataCtr
;
570 typedef [public,noprint
] struct {
571 drsuapi_DsReplicaObjectListItemEx
*next_object
;
572 drsuapi_DsReplicaObject
object;
573 boolean32 is_nc_prefix
;
574 GUID
*parent_object_guid
;
575 drsuapi_DsReplicaMetaDataCtr
*meta_data_ctr
;
576 } drsuapi_DsReplicaObjectListItemEx
;
578 typedef [public,gensize
] struct {
579 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
580 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
581 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
582 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
583 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
584 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
585 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
586 drsuapi_DsExtendedError extended_ret
; /* w2k sends the nc_object_count value here */
588 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
589 [value
(ndr_size_drsuapi_DsGetNCChangesCtr1
(r
,ndr
->flags
)+55)] uint32 __ndr_size
;
590 drsuapi_DsReplicaObjectListItemEx
*first_object
;
592 } drsuapi_DsGetNCChangesCtr1
;
595 * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
596 * isn't there it means the value is deleted
598 typedef [public] bitmap
{
599 DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
= 0x00000001
600 } drsuapi_DsLinkedAttributeFlags
;
602 typedef [public] struct {
603 drsuapi_DsReplicaObjectIdentifier
*identifier
;
604 drsuapi_DsAttributeId attid
;
605 drsuapi_DsAttributeValue value
;
606 drsuapi_DsLinkedAttributeFlags flags
;
607 NTTIME_1sec originating_add_time
;
608 drsuapi_DsReplicaMetaData meta_data
;
609 } drsuapi_DsReplicaLinkedAttribute
;
611 typedef [public,gensize
] struct {
612 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
613 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
614 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
615 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
616 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
617 drsuapi_DsReplicaCursor2CtrEx
*uptodateness_vector
;
618 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
619 drsuapi_DsExtendedError extended_ret
;
621 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
622 [value
(ndr_size_drsuapi_DsGetNCChangesCtr6
(r
,ndr
->flags
)+55)] uint32 __ndr_size
;
623 drsuapi_DsReplicaObjectListItemEx
*first_object
;
625 uint32 nc_object_count
; /* estimated amount of objects in the whole NC */
626 uint32 nc_linked_attributes_count
; /* estimated amount of linked values in the whole NC */
627 [range(0,1048576)] uint32 linked_attributes_count
;
628 [size_is(linked_attributes_count
)] drsuapi_DsReplicaLinkedAttribute
*linked_attributes
;
630 } drsuapi_DsGetNCChangesCtr6
;
633 uint32 decompressed_length
;
634 uint32 compressed_length
;
635 [subcontext
(4),subcontext_size
(compressed_length
),
636 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
637 drsuapi_DsGetNCChangesCtr1
*ctr1
;
638 } drsuapi_DsGetNCChangesMSZIPCtr1
;
641 uint32 decompressed_length
;
642 uint32 compressed_length
;
643 [subcontext
(4),subcontext_size
(compressed_length
),
644 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
645 drsuapi_DsGetNCChangesCtr6
*ctr6
;
646 } drsuapi_DsGetNCChangesMSZIPCtr6
;
649 uint32 decompressed_length
;
650 uint32 compressed_length
;
651 [subcontext
(4),subcontext_size
(compressed_length
),
652 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
653 drsuapi_DsGetNCChangesCtr1
*ctr1
;
654 } drsuapi_DsGetNCChangesXPRESSCtr1
;
657 uint32 decompressed_length
;
658 uint32 compressed_length
;
659 [subcontext
(4),subcontext_size
(compressed_length
),
660 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
661 drsuapi_DsGetNCChangesCtr6
*ctr6
;
662 } drsuapi_DsGetNCChangesXPRESSCtr6
;
664 typedef [enum16bit
] enum {
665 DRSUAPI_COMPRESSION_TYPE_MSZIP
= 2,
666 DRSUAPI_COMPRESSION_TYPE_XPRESS
= 3
667 } drsuapi_DsGetNCChangesCompressionType
;
669 typedef [nodiscriminant
,flag
(NDR_PAHEX
)] union {
670 [case(1|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1
;
671 [case(6|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6
;
672 [case(1|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1
;
673 [case(6|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6
;
674 } drsuapi_DsGetNCChangesCompressedCtr
;
678 * this is a bit ugly, as the compression depends on the flags
679 * in the DsBind(), but only w2k uses DsGetNCChangesReq5
680 * and will get DsGetNCChangesCtr2 replies, and w2k only knowns
681 * about MSZIP and level 1 replies
683 [switch_is(1|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr
;
684 } drsuapi_DsGetNCChangesCtr2
;
687 [range(0,6)] int32 level
;
688 [range(2,3)] drsuapi_DsGetNCChangesCompressionType type
;
689 [switch_is(level |
(type
<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr
;
690 } drsuapi_DsGetNCChangesCtr7
;
692 typedef [switch_type(int32
)] union {
693 [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1
;
694 [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2
;
695 [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6
;
696 [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7
;
697 } drsuapi_DsGetNCChangesCtr
;
699 WERROR drsuapi_DsGetNCChanges
(
700 [in] policy_handle
*bind_handle
,
702 [in,ref,switch_is(level
)] drsuapi_DsGetNCChangesRequest
*req
,
703 [out,ref] int32
*level_out
,
704 [out,ref,switch_is(*level_out
)] drsuapi_DsGetNCChangesCtr
*ctr
710 DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION
= 0x00000001,
711 DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE
= 0x00000002,
712 DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE
= 0x00000004,
713 DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE
= 0x00000008,
714 DRSUAPI_DS_REPLICA_UPDATE_0x00000010
= 0x00000010
715 } drsuapi_DsReplicaUpdateRefsOptions
;
718 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
719 [ref,charset
(DOS
),string] uint8
*dest_dsa_dns_name
;
721 drsuapi_DsReplicaUpdateRefsOptions options
;
722 } drsuapi_DsReplicaUpdateRefsRequest1
;
724 typedef [switch_type(int32
)] union {
725 [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1
;
726 } drsuapi_DsReplicaUpdateRefsRequest
;
728 WERROR drsuapi_DsReplicaUpdateRefs
(
729 [in] policy_handle
*bind_handle
,
731 [in,switch_is(level
)] drsuapi_DsReplicaUpdateRefsRequest req
737 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
= 0x00000001,
738 DRSUAPI_DS_REPLICA_ADD_WRITEABLE
= 0x00000002
740 } drsuapi_DsReplicaAddOptions
;
742 WERROR DRSUAPI_REPLICA_ADD
();
747 DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION
= 0x00000001,
748 DRSUAPI_DS_REPLICA_DELETE_WRITEABLE
= 0x00000002
750 } drsuapi_DsReplicaDeleteOptions
;
752 WERROR DRSUAPI_REPLICA_DEL
();
757 DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION
= 0x00000001,
758 DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE
= 0x00000002
759 } drsuapi_DsReplicaModifyOptions
;
761 WERROR DRSUAPI_REPLICA_MODIFY
();
765 WERROR DRSUAPI_VERIFY_NAMES
();
770 /* how are type 4 and 7 different from 2 and 3 ? */
771 typedef [v1_enum] enum {
772 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS
= 1,
773 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS
= 2,
774 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS
= 3,
775 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2
= 4,
776 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS
= 5,
777 DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS
= 6,
778 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2
= 7
779 } drsuapi_DsMembershipType
;
783 [range(0,10000)] uint32 num_memberships
;
784 [range(0,10000)] uint32 num_sids
;
785 [size_is(num_memberships
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
786 [size_is(num_memberships
)] samr_GroupAttrs
*group_attrs
;
787 [size_is(num_sids
)] dom_sid28
**sids
;
788 } drsuapi_DsGetMembershipsCtr1
;
790 typedef [switch_type(int32
)] union {
791 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
792 } drsuapi_DsGetMembershipsCtr
;
794 const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR
= 0x1;
797 [range(1,10000)] uint32 count
;
798 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
800 drsuapi_DsMembershipType type
;
801 drsuapi_DsReplicaObjectIdentifier
*domain
;
802 } drsuapi_DsGetMembershipsRequest1
;
804 typedef [switch_type(int32
)] union {
805 [case(1)] drsuapi_DsGetMembershipsRequest1 req1
;
806 } drsuapi_DsGetMembershipsRequest
;
808 WERROR drsuapi_DsGetMemberships
(
809 [in] policy_handle
*bind_handle
,
811 [in,ref] [switch_is(level
)] drsuapi_DsGetMembershipsRequest
*req
,
812 [out,ref] int32
*level_out
,
813 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMembershipsCtr
*ctr
818 WERROR DRSUAPI_INTER_DOMAIN_MOVE
();
825 [range(0,0x00A00000)] uint32 length
;
826 [size_is(length
)] uint8
*data
;
827 } drsuapi_DsGetNT4ChangeLogRequest1
;
829 typedef [switch_type(uint32
)] union {
830 [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1
;
831 } drsuapi_DsGetNT4ChangeLogRequest
;
834 [range(0,0x00A00000)] uint32 length1
;
835 [range(0,0x00A00000)] uint32 length2
;
843 [size_is(length1
)] uint8
*data1
;
844 [size_is(length2
)] uint8
*data2
;
845 } drsuapi_DsGetNT4ChangeLogInfo1
;
847 typedef [switch_type(uint32
)] union {
848 [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1
;
849 } drsuapi_DsGetNT4ChangeLogInfo
;
851 WERROR drsuapi_DsGetNT4ChangeLog
(
852 [in] policy_handle
*bind_handle
,
854 [in,ref] [switch_is(level
)] drsuapi_DsGetNT4ChangeLogRequest
*req
,
855 [out,ref] uint32
*level_out
,
856 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetNT4ChangeLogInfo
*info
861 typedef [v1_enum] enum {
862 DRSUAPI_DS_NAME_STATUS_OK
= 0,
863 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
= 1,
864 DRSUAPI_DS_NAME_STATUS_NOT_FOUND
= 2,
865 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
= 3,
866 DRSUAPI_DS_NAME_STATUS_NO_MAPPING
= 4,
867 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
= 5,
868 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
= 6,
869 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
= 7
870 } drsuapi_DsNameStatus
;
872 typedef [v1_enum] enum {
873 DRSUAPI_DS_NAME_FLAG_NO_FLAGS
= 0x0,
874 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
= 0x1,
875 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
= 0x2,
876 DRSUAPI_DS_NAME_FLAG_GCVERIFY
= 0x4,
877 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
= 0x8
878 } drsuapi_DsNameFlags
;
880 typedef [v1_enum] enum {
881 DRSUAPI_DS_NAME_FORMAT_UKNOWN
= 0,
882 DRSUAPI_DS_NAME_FORMAT_FQDN_1779
= 1,
883 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
= 2,
884 DRSUAPI_DS_NAME_FORMAT_DISPLAY
= 3,
885 DRSUAPI_DS_NAME_FORMAT_GUID
= 6,
886 DRSUAPI_DS_NAME_FORMAT_CANONICAL
= 7,
887 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
= 8,
888 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
= 9,
889 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
= 10,
890 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
= 11,
891 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
= 12
892 } drsuapi_DsNameFormat
;
895 [string,charset
(UTF16
)] uint16
*str
;
896 } drsuapi_DsNameString
;
899 uint32 codepage
; /* 0x000004e4 - 1252 is german codepage*/
900 uint32 language
; /* 0x00000407 - german language ID*/
901 drsuapi_DsNameFlags format_flags
;
902 drsuapi_DsNameFormat format_offered
;
903 drsuapi_DsNameFormat format_desired
;
904 [range(1,10000)] uint32 count
;
905 [size_is(count
)] drsuapi_DsNameString
*names
;
906 } drsuapi_DsNameRequest1
;
908 typedef [switch_type(int32
)] union {
909 [case(1)] drsuapi_DsNameRequest1 req1
;
910 } drsuapi_DsNameRequest
;
913 drsuapi_DsNameStatus status
;
914 [charset
(UTF16
),string] uint16
*dns_domain_name
;
915 [charset
(UTF16
),string] uint16
*result_name
;
916 } drsuapi_DsNameInfo1
;
920 [size_is(count
)] drsuapi_DsNameInfo1
*array
;
921 } drsuapi_DsNameCtr1
;
923 typedef [switch_type(int32
)] union {
924 [case(1)] drsuapi_DsNameCtr1
*ctr1
;
927 WERROR drsuapi_DsCrackNames
(
928 [in] policy_handle
*bind_handle
,
930 [in,ref,switch_is(level
)] drsuapi_DsNameRequest
*req
,
931 [out,ref] int32
*level_out
,
932 [out,ref,switch_is(*level_out
)] drsuapi_DsNameCtr
*ctr
937 typedef [v1_enum] enum {
938 DRSUAPI_DS_SPN_OPERATION_ADD
= 0,
939 DRSUAPI_DS_SPN_OPERATION_REPLACE
= 1,
940 DRSUAPI_DS_SPN_OPERATION_DELETE
= 2
941 } drsuapi_DsSpnOperation
;
944 drsuapi_DsSpnOperation operation
;
946 [charset
(UTF16
),string] uint16
*object_dn
;
947 [range(0,10000)] uint32 count
;
948 [size_is(count
)] drsuapi_DsNameString
*spn_names
;
949 } drsuapi_DsWriteAccountSpnRequest1
;
951 typedef [switch_type(int32
)] union {
952 [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1
;
953 } drsuapi_DsWriteAccountSpnRequest
;
957 } drsuapi_DsWriteAccountSpnResult1
;
959 typedef [switch_type(int32
)] union {
960 [case(1)] drsuapi_DsWriteAccountSpnResult1 res1
;
961 } drsuapi_DsWriteAccountSpnResult
;
963 WERROR drsuapi_DsWriteAccountSpn
(
964 [in] policy_handle
*bind_handle
,
966 [in,ref,switch_is(level
)] drsuapi_DsWriteAccountSpnRequest
*req
,
967 [out,ref] int32
*level_out
,
968 [out,ref,switch_is(*level_out
)] drsuapi_DsWriteAccountSpnResult
*res
974 [charset
(UTF16
),string] uint16
*server_dn
;
975 [charset
(UTF16
),string] uint16
*domain_dn
;
976 uint32 unknown
; /* 0x000000001 */
977 } drsuapi_DsRemoveDSServerRequest1
;
979 typedef [switch_type(int32
)] union {
980 [case(1)] drsuapi_DsRemoveDSServerRequest1 req1
;
981 } drsuapi_DsRemoveDSServerRequest
;
985 } drsuapi_DsRemoveDSServerResult1
;
987 typedef [switch_type(int32
)] union {
988 [case(1)] drsuapi_DsRemoveDSServerResult1 res1
;
989 } drsuapi_DsRemoveDSServerResult
;
991 WERROR drsuapi_DsRemoveDSServer
(
992 [in] policy_handle
*bind_handle
,
994 [in,ref,switch_is(level
)] drsuapi_DsRemoveDSServerRequest
*req
,
995 [out,ref] int32
*level_out
,
996 [out,ref,switch_is(*level_out
)] drsuapi_DsRemoveDSServerResult
*res
1001 WERROR DRSUAPI_REMOVE_DS_DOMAIN
();
1006 [charset
(UTF16
),string] uint16
*domain_name
; /* netbios or dns */
1007 int32 level
; /* specifies the switch level for the request */
1008 } drsuapi_DsGetDCInfoRequest1
;
1010 typedef [switch_type(int32
)] union {
1011 [case(1)] drsuapi_DsGetDCInfoRequest1 req1
;
1012 } drsuapi_DsGetDCInfoRequest
;
1015 [charset
(UTF16
),string] uint16
*netbios_name
;
1016 [charset
(UTF16
),string] uint16
*dns_name
;
1017 [charset
(UTF16
),string] uint16
*site_name
;
1018 [charset
(UTF16
),string] uint16
*computer_dn
;
1019 [charset
(UTF16
),string] uint16
*server_dn
;
1022 } drsuapi_DsGetDCInfo1
;
1025 [range(0,10000)] uint32 count
;
1026 [size_is(count
)] drsuapi_DsGetDCInfo1
*array
;
1027 } drsuapi_DsGetDCInfoCtr1
;
1030 [charset
(UTF16
),string] uint16
*netbios_name
;
1031 [charset
(UTF16
),string] uint16
*dns_name
;
1032 [charset
(UTF16
),string] uint16
*site_name
;
1033 [charset
(UTF16
),string] uint16
*site_dn
;
1034 [charset
(UTF16
),string] uint16
*computer_dn
;
1035 [charset
(UTF16
),string] uint16
*server_dn
;
1036 [charset
(UTF16
),string] uint16
*ntds_dn
;
1044 } drsuapi_DsGetDCInfo2
;
1047 [range(0,10000)] uint32 count
;
1048 [size_is(count
)] drsuapi_DsGetDCInfo2
*array
;
1049 } drsuapi_DsGetDCInfoCtr2
;
1052 [charset
(UTF16
),string] uint16
*netbios_name
;
1053 [charset
(UTF16
),string] uint16
*dns_name
;
1054 [charset
(UTF16
),string] uint16
*site_name
;
1055 [charset
(UTF16
),string] uint16
*site_dn
;
1056 [charset
(UTF16
),string] uint16
*computer_dn
;
1057 [charset
(UTF16
),string] uint16
*server_dn
;
1058 [charset
(UTF16
),string] uint16
*ntds_dn
;
1067 } drsuapi_DsGetDCInfo3
;
1070 [range(0,10000)] uint32 count
;
1071 [size_is(count
)] drsuapi_DsGetDCInfo3
*array
;
1072 } drsuapi_DsGetDCInfoCtr3
;
1075 * this represents an active connection to the
1076 * Directory System Agent (DSA)
1077 * this can be via LDAP or DRSUAPI
1080 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1082 uint32 connection_time
; /* in seconds */
1087 * client_account can be the following:
1088 * "W2K3\Administrator"
1089 * "Administrator@W2K3"
1090 * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
1094 [charset
(UTF16
),string] uint16
*client_account
;
1095 } drsuapi_DsGetDCConnection01
;
1098 [range(0,10000)] uint32 count
;
1099 [size_is(count
)] drsuapi_DsGetDCConnection01
*array
;
1100 } drsuapi_DsGetDCConnectionCtr01
;
1102 typedef [v1_enum] enum {
1103 DRSUAPI_DC_INFO_CTR_1
= 1,
1104 DRSUAPI_DC_INFO_CTR_2
= 2,
1105 DRSUAPI_DC_INFO_CTR_3
= 3,
1106 DRSUAPI_DC_CONNECTION_CTR_01
= -1
1107 } drsuapi_DsGetDCInfoCtrLevels
;
1109 typedef [switch_type(int32
)] union {
1110 [case(DRSUAPI_DC_INFO_CTR_1
)] drsuapi_DsGetDCInfoCtr1 ctr1
;
1111 [case(DRSUAPI_DC_INFO_CTR_2
)] drsuapi_DsGetDCInfoCtr2 ctr2
;
1112 [case(DRSUAPI_DC_INFO_CTR_3
)] drsuapi_DsGetDCInfoCtr3 ctr3
;
1113 [case(DRSUAPI_DC_CONNECTION_CTR_01
)] drsuapi_DsGetDCConnectionCtr01 ctr01
;
1114 } drsuapi_DsGetDCInfoCtr
;
1116 WERROR drsuapi_DsGetDomainControllerInfo
(
1117 [in] policy_handle
*bind_handle
,
1119 [in,ref,switch_is(level
)] drsuapi_DsGetDCInfoRequest
*req
,
1120 [out,ref] int32
*level_out
,
1121 [out,ref,switch_is(*level_out
)] drsuapi_DsGetDCInfoCtr
*ctr
1126 typedef [public,noprint
] struct {
1127 drsuapi_DsReplicaObjectListItem
*next_object
;
1128 drsuapi_DsReplicaObject
object;
1129 } drsuapi_DsReplicaObjectListItem
;
1132 * The DsAddEntry() call which creates a nTDSDSA object,
1133 * also adds a servicePrincipalName in the following form
1134 * to the computer account of the new domain controller
1135 * referenced by the "serverReferenece" attribute.
1137 * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
1139 * also note that the "serverReference" isn't added to the new object!
1141 const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID
= "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
1144 * please note the the current idl
1145 * for DsAddEntry does only parse
1146 * what I saw between 2 w2k3 boxes
1147 * in my dssync experiments I got some other replies
1148 * so all I want to say is that this is very incomplete yet...
1152 drsuapi_DsReplicaObjectListItem first_object
;
1153 } drsuapi_DsAddEntryRequest2
;
1155 typedef [switch_type(int32
)] union {
1156 [case(2)] drsuapi_DsAddEntryRequest2 req2
;
1157 } drsuapi_DsAddEntryRequest
;
1164 } drsuapi_DsAddEntryErrorInfoX
;
1167 [range(0,10485760)] uint32 size
;
1168 [size_is(size
)] uint8
*data
;
1169 } drsuapi_DsAddEntryExtraErrorBuffer
;
1172 drsuapi_DsAddEntryErrorInfoX error
;
1173 drsuapi_DsAttributeId attid
;
1175 drsuapi_DsAddEntryExtraErrorBuffer buffer
;
1176 } drsuapi_DsAddEntryExtraError1
;
1178 typedef /*[noprint]*/ struct {
1179 drsuapi_DsAddEntryErrorListItem1
*next
;
1180 drsuapi_DsAddEntryExtraError1 error
;
1181 } drsuapi_DsAddEntryErrorListItem1
;
1184 drsuapi_DsReplicaObjectIdentifier
*id;
1186 drsuapi_DsAddEntryErrorListItem1 first
;
1187 } drsuapi_DsAddEntryErrorInfo1
;
1189 typedef [switch_type(uint32
)] union {
1190 [case(1)] drsuapi_DsAddEntryErrorInfo1 error1
;
1191 /* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
1192 [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
1193 */ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX
;
1194 [case(5)] drsuapi_DsAddEntryErrorInfoX errorX
;
1195 [case(6)] drsuapi_DsAddEntryErrorInfoX errorX
;
1196 [case(7)] drsuapi_DsAddEntryErrorInfoX errorX
;
1197 } drsuapi_DsAddEntryErrorInfo
;
1202 [switch_is(level
)] drsuapi_DsAddEntryErrorInfo
*info
;
1203 } drsuapi_DsAddEntryError1
;
1205 typedef [switch_type(uint32
)] union {
1206 [case(1)] drsuapi_DsAddEntryError1 info1
;
1207 } drsuapi_DsAddEntryError
;
1212 } drsuapi_DsReplicaObjectIdentifier2
;
1215 drsuapi_DsReplicaObjectIdentifier
*id;
1217 drsuapi_DsAddEntryErrorInfoX error
;
1218 [range(0,10000)] uint32 count
;
1219 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1220 } drsuapi_DsAddEntryCtr2
;
1223 drsuapi_DsReplicaObjectIdentifier
*id;
1225 [switch_is(level
)] drsuapi_DsAddEntryError
*error
;
1226 [range(0,10000)] uint32 count
;
1227 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1228 } drsuapi_DsAddEntryCtr3
;
1230 typedef [switch_type(int32
)] union {
1231 [case(2)] drsuapi_DsAddEntryCtr2 ctr2
;
1232 [case(3)] drsuapi_DsAddEntryCtr3 ctr3
;
1233 } drsuapi_DsAddEntryCtr
;
1235 [public] WERROR drsuapi_DsAddEntry
(
1236 [in] policy_handle
*bind_handle
,
1238 [in,ref,switch_is(level
)] drsuapi_DsAddEntryRequest
*req
,
1239 [out,ref] int32
*level_out
,
1240 [out,ref,switch_is(*level_out
)] drsuapi_DsAddEntryCtr
*ctr
1245 WERROR DRSUAPI_EXECUTE_KCC
();
1249 typedef [v1_enum] enum {
1250 DRSUAPI_DS_REPLICA_GET_INFO
= 1,
1251 DRSUAPI_DS_REPLICA_GET_INFO2
= 2
1252 } drsuapi_DsReplicaGetInfoLevel
;
1254 typedef [v1_enum] enum {
1255 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
= 0,
1256 DRSUAPI_DS_REPLICA_INFO_CURSORS
= 1,
1257 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
= 2,
1258 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
= 3,
1259 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
= 4,
1260 DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
= 5,
1261 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
= 6,
1262 DRSUAPI_DS_REPLICA_INFO_CURSORS2
= 7,
1263 DRSUAPI_DS_REPLICA_INFO_CURSORS3
= 8,
1264 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
= 9,
1265 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
= 10,
1266 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
= -2,
1267 DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
= -4,
1268 DRSUAPI_DS_REPLICA_INFO_CURSORS05
= -5,
1269 DRSUAPI_DS_REPLICA_INFO_06
= -6
1270 } drsuapi_DsReplicaInfoType
;
1273 drsuapi_DsReplicaInfoType info_type
;
1274 [charset
(UTF16
),string] uint16
*object_dn
;
1276 } drsuapi_DsReplicaGetInfoRequest1
;
1279 drsuapi_DsReplicaInfoType info_type
;
1280 [charset
(UTF16
),string] uint16
*object_dn
;
1283 [charset
(UTF16
),string] uint16
*string1
;
1284 [charset
(UTF16
),string] uint16
*string2
;
1286 } drsuapi_DsReplicaGetInfoRequest2
;
1288 typedef [switch_type(drsuapi_DsReplicaGetInfoLevel
)] union {
1289 [case(DRSUAPI_DS_REPLICA_GET_INFO
)] drsuapi_DsReplicaGetInfoRequest1 req1
;
1290 [case(DRSUAPI_DS_REPLICA_GET_INFO2
)] drsuapi_DsReplicaGetInfoRequest2 req2
;
1291 } drsuapi_DsReplicaGetInfoRequest
;
1294 [charset
(UTF16
),string] uint16
*naming_context_dn
;
1295 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1296 [charset
(UTF16
),string] uint16
*source_dsa_address
;
1297 [charset
(UTF16
),string] uint16
*transport_obj_dn
;
1298 drsuapi_DsReplicaNeighbourFlags replica_flags
;
1300 GUID naming_context_obj_guid
;
1301 GUID source_dsa_obj_guid
;
1302 GUID source_dsa_invocation_id
;
1303 GUID transport_obj_guid
;
1304 hyper tmp_highest_usn
;
1306 NTTIME last_success
;
1307 NTTIME last_attempt
;
1308 WERROR result_last_attempt
;
1309 uint32 consecutive_sync_failures
;
1310 } drsuapi_DsReplicaNeighbour
;
1315 [size_is(count
)] drsuapi_DsReplicaNeighbour array
[];
1316 } drsuapi_DsReplicaNeighbourCtr
;
1321 [size_is(count
)] drsuapi_DsReplicaCursor array
[];
1322 } drsuapi_DsReplicaCursorCtr
;
1325 [charset
(UTF16
),string] uint16
*attribute_name
;
1327 NTTIME originating_change_time
;
1328 GUID originating_invocation_id
;
1329 hyper originating_usn
;
1331 } drsuapi_DsReplicaObjMetaData
;
1336 [size_is(count
)] drsuapi_DsReplicaObjMetaData array
[];
1337 } drsuapi_DsReplicaObjMetaDataCtr
;
1340 [charset
(UTF16
),string] uint16
*dsa_obj_dn
;
1342 NTTIME first_failure
;
1343 uint32 num_failures
;
1345 } drsuapi_DsReplicaKccDsaFailure
;
1350 [size_is(count
)] drsuapi_DsReplicaKccDsaFailure array
[];
1351 } drsuapi_DsReplicaKccDsaFailuresCtr
;
1354 DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
= 0,
1355 DRSUAPI_DS_REPLICA_OP_TYPE_ADD
= 1,
1356 DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
= 2,
1357 DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
= 3,
1358 DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
= 4
1359 } drsuapi_DsReplicaOpType
;
1361 typedef [switch_type(drsuapi_DsReplicaOpType
)] union {
1362 [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
)] drsuapi_DsReplicaSyncOptions sync
;
1363 [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD
)] drsuapi_DsReplicaAddOptions add
;
1364 [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
)] drsuapi_DsReplicaDeleteOptions op_delete
;
1365 [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
)] drsuapi_DsReplicaModifyOptions modify
;
1366 [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
)] drsuapi_DsReplicaUpdateRefsOptions update_refs
;
1367 [default] uint32 unknown
;
1368 } drsuapi_DsRplicaOpOptions
;
1371 NTTIME operation_start
;
1372 uint32 serial_num
; /* unique till reboot */
1374 drsuapi_DsReplicaOpType operation_type
;
1375 [switch_is(operation_type
)] drsuapi_DsRplicaOpOptions options
;
1376 [charset
(UTF16
),string] uint16
*nc_dn
;
1377 [charset
(UTF16
),string] uint16
*remote_dsa_obj_dn
;
1378 [charset
(UTF16
),string] uint16
*remote_dsa_address
;
1380 GUID remote_dsa_obj_guid
;
1381 } drsuapi_DsReplicaOp
;
1386 [size_is(count
)] drsuapi_DsReplicaOp array
[];
1387 } drsuapi_DsReplicaOpCtr
;
1390 [charset
(UTF16
),string] uint16
*attribute_name
;
1391 [charset
(UTF16
),string] uint16
*object_dn
;
1392 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1397 NTTIME originating_change_time
;
1398 GUID originating_invocation_id
;
1399 hyper originating_usn
;
1401 } drsuapi_DsReplicaAttrValMetaData
;
1405 int32 enumeration_context
;
1406 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData array
[];
1407 } drsuapi_DsReplicaAttrValMetaDataCtr
;
1411 int32 enumeration_context
;
1412 [size_is(count
)] drsuapi_DsReplicaCursor2 array
[];
1413 } drsuapi_DsReplicaCursor2Ctr
;
1416 GUID source_dsa_invocation_id
;
1418 NTTIME last_sync_success
;
1419 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1420 } drsuapi_DsReplicaCursor3
;
1424 int32 enumeration_context
;
1425 [size_is(count
)] drsuapi_DsReplicaCursor3 array
[];
1426 } drsuapi_DsReplicaCursor3Ctr
;
1429 [charset
(UTF16
),string] uint16
*attribute_name
;
1431 NTTIME originating_change_time
;
1432 GUID originating_invocation_id
;
1433 hyper originating_usn
;
1435 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1436 } drsuapi_DsReplicaObjMetaData2
;
1440 int32 enumeration_context
;
1441 [size_is(count
)] drsuapi_DsReplicaObjMetaData2 array
[];
1442 } drsuapi_DsReplicaObjMetaData2Ctr
;
1445 [charset
(UTF16
),string] uint16
*attribute_name
;
1446 [charset
(UTF16
),string] uint16
*object_dn
;
1447 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1452 NTTIME originating_change_time
;
1453 GUID originating_invocation_id
;
1454 hyper originating_usn
;
1456 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1457 } drsuapi_DsReplicaAttrValMetaData2
;
1461 int32 enumeration_context
;
1462 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData2 array
[];
1463 } drsuapi_DsReplicaAttrValMetaData2Ctr
;
1466 hyper u1
; /* session number? */
1470 NTTIME_1sec bind_time
;
1471 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1472 uint32 u5
; /* this is the same value the client used as pid in the DsBindInfoX struct */
1473 } drsuapi_DsReplicaConnection04
;
1476 [range(0,10000)] uint32 count
;
1478 [size_is(count
)] drsuapi_DsReplicaConnection04 array
[];
1479 } drsuapi_DsReplicaConnection04Ctr
;
1482 [charset
(UTF16
),string] uint16
*str1
;
1490 } drsuapi_DsReplica06
;
1493 [range(0,256)] uint32 count
;
1495 [size_is(count
)] drsuapi_DsReplica06 array
[];
1496 } drsuapi_DsReplica06Ctr
;
1498 typedef [switch_type(drsuapi_DsReplicaInfoType
)] union {
1499 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
)] drsuapi_DsReplicaNeighbourCtr
*neighbours
;
1500 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS
)] drsuapi_DsReplicaCursorCtr
*cursors
;
1501 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
)] drsuapi_DsReplicaObjMetaDataCtr
*objmetadata
;
1502 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*connectfailures
;
1503 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*linkfailures
;
1504 [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
)] drsuapi_DsReplicaOpCtr
*pendingops
;
1505 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
)] drsuapi_DsReplicaAttrValMetaDataCtr
*attrvalmetadata
;
1506 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2
)] drsuapi_DsReplicaCursor2Ctr
*cursors2
;
1507 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3
)] drsuapi_DsReplicaCursor3Ctr
*cursors3
;
1508 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
)] drsuapi_DsReplicaObjMetaData2Ctr
*objmetadata2
;
1509 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
)] drsuapi_DsReplicaAttrValMetaData2Ctr
*attrvalmetadata2
;
1510 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
)] drsuapi_DsReplicaNeighbourCtr
*neighbours02
;
1511 [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
)] drsuapi_DsReplicaConnection04Ctr
*connections04
;
1512 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05
)] drsuapi_DsReplicaCursorCtrEx
*cursors05
;
1513 [case(DRSUAPI_DS_REPLICA_INFO_06
)] drsuapi_DsReplica06Ctr
*i06
;
1514 } drsuapi_DsReplicaInfo
;
1516 WERROR drsuapi_DsReplicaGetInfo
(
1517 [in] policy_handle
*bind_handle
,
1518 [in] drsuapi_DsReplicaGetInfoLevel level
,
1519 [in,ref,switch_is(level
)] drsuapi_DsReplicaGetInfoRequest
*req
,
1520 [out,ref] drsuapi_DsReplicaInfoType
*info_type
,
1521 [out,ref,switch_is(*info_type
)] drsuapi_DsReplicaInfo
*info
1526 WERROR DRSUAPI_ADD_SID_HISTORY
();
1532 [range(0,10000)] uint32 num_entries
;
1533 [size_is(num_entries
)] drsuapi_DsGetMembershipsCtr1
**ctrl_array
;
1534 } drsuapi_DsGetMemberships2Ctr1
;
1536 typedef [switch_type(int32
)] union {
1537 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
1538 } drsuapi_DsGetMemberships2Ctr
;
1541 [range(1,10000)] uint32 num_req
;
1542 [size_is(num_req
)] drsuapi_DsGetMembershipsRequest1
**req_array
;
1543 } drsuapi_DsGetMemberships2Request1
;
1545 typedef [switch_type(int32
)] union {
1546 [case(1)] drsuapi_DsGetMemberships2Request1 req1
;
1547 } drsuapi_DsGetMemberships2Request
;
1549 WERROR drsuapi_DsGetMemberships2
(
1550 [in] policy_handle
*bind_handle
,
1552 [in,ref] [switch_is(level
)] drsuapi_DsGetMemberships2Request
*req
,
1553 [out,ref] int32
*level_out
,
1554 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMemberships2Ctr
*ctr
1560 WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS
();
1564 WERROR DRSUAPI_GET_OBJECT_EXISTENCE
();
1571 } drsuapi_DsSiteCostInfo
;
1574 [range(0,10000)] uint32 num_info
;
1575 [size_is(num_info
)] drsuapi_DsSiteCostInfo
*info
;
1577 } drsuapi_QuerySitesByCostCtr1
;
1579 typedef [switch_type(int32
)] union {
1580 [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1
;
1581 } drsuapi_QuerySitesByCostCtr
;
1584 [charset
(UTF16
),string] uint16
*site_from
;
1585 [range(1,10000)] uint32 num_req
;
1586 [size_is(num_req
)] [charset
(UTF16
),string] uint16
**site_to
;
1588 } drsuapi_QuerySitesByCostRequest1
;
1590 typedef [switch_type(int32
)] union {
1591 [case(1)] drsuapi_QuerySitesByCostRequest1 req1
;
1592 } drsuapi_QuerySitesByCostRequest
;
1594 WERROR drsuapi_QuerySitesByCost
(
1595 [in] policy_handle
*bind_handle
,
1597 [in,ref] [switch_is(level
)] drsuapi_QuerySitesByCostRequest
*req
,
1598 [out,ref] int32
*level_out
,
1599 [out,ref] [switch_is(*level_out
)] drsuapi_QuerySitesByCostCtr
*ctr