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
->iconv_convenience
, 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_ASYNC_REP
= 0x00000100,
228 DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_ERROR
= 0x00000100,
229 DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC
= 0x00000200,
230 DRSUAPI_DS_REPLICA_NEIGHBOUR_CRITICAL_ONLY
= 0x00000400,
231 DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS
= 0x00000800,/*Include updates to ancestor objects before updates to their descendants*/
232 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS
= 0x00010000,
233 DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_SYNC_PACKET
= 0x00020000,
234 DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED
= 0x00200000,
235 DRSUAPI_DS_REPLICA_NEIGHBOUR_SPECIAL_SECRET_PROCESSING
= 0x00800000,
236 DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED
= 0x01000000,
237 DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS
= 0x04000000,
238 DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC
= 0x08000000,
240 * the following NOTE applies to DsGetNCChangesRequest5:
241 * - the data is only compressed when 10 or more objects are replicated
242 * - but there could also be a size limit of 35 KBytes or something like that
243 * - the reply is DsGetNCChangesCtr2
244 * - maybe the same applies to DsGetNCChangesRequest8...
248 DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES
= 0x10000000,
249 DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS
= 0x20000000,
250 DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET
= 0x40000000
251 } drsuapi_DsReplicaNeighbourFlags
;
253 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
254 DRSUAPI_EXOP_NONE
= 0x00000000,
255 DRSUAPI_EXOP_FSMO_REQ_ROLE
= 0x00000001,
256 DRSUAPI_EXOP_FSMO_RID_ALLOC
= 0x00000002,
257 DRSUAPI_EXOP_FSMO_RID_REQ_ROLE
= 0x00000003,
258 DRSUAPI_EXOP_FSMO_REQ_PDC
= 0x00000004,
259 DRSUAPI_EXOP_FSMO_ABANDON_ROLE
= 0x00000005,
260 DRSUAPI_EXOP_REPL_OBJ
= 0x00000006,
261 DRSUAPI_EXOP_REPL_SECRET
= 0x00000007
262 } drsuapi_DsExtendedOperation
;
264 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
265 DRSUAPI_EXOP_ERR_NONE
= 0x00000000,
266 DRSUAPI_EXOP_ERR_SUCCESS
= 0x00000001,
267 DRSUAPI_EXOP_ERR_UNKNOWN_OP
= 0x00000002,
268 DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER
= 0x00000003,
269 DRSUAPI_EXOP_ERR_UPDATE_ERR
= 0x00000004,
270 DRSUAPI_EXOP_ERR_EXCEPTION
= 0x00000005,
271 DRSUAPI_EXOP_ERR_UNKNOWN_CALLER
= 0x00000006,
272 DRSUAPI_EXOP_ERR_RID_ALLOC
= 0x00000007,
273 DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED
= 0x00000008,
274 DRSUAPI_EXOP_ERR_FMSO_PENDING_OP
= 0x00000009,
275 DRSUAPI_EXOP_ERR_MISMATCH
= 0x0000000A,
276 DRSUAPI_EXOP_ERR_COULDNT_CONTACT
= 0x0000000B,
277 DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES
= 0x0000000C,
278 DRSUAPI_EXOP_ERR_DIR_ERROR
= 0x0000000D,
279 DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS
= 0x0000000E,
280 DRSUAPI_EXOP_ERR_ACCESS_DENIED
= 0x0000000F,
281 DRSUAPI_EXOP_ERR_PARAM_ERROR
= 0x00000010
282 } drsuapi_DsExtendedError
;
285 GUID destination_dsa_guid
;
286 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
287 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
288 drsuapi_DsReplicaHighWaterMark highwatermark
;
289 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
290 drsuapi_DsReplicaNeighbourFlags replica_flags
;
291 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
292 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
293 drsuapi_DsExtendedOperation extended_op
;
295 } drsuapi_DsGetNCChangesRequest5
;
298 * In DRSUAPI all attributes with syntax 2.5.5.2
299 * are identified by uint32 values
301 * the following table shows the mapping used between the two representations
302 * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
303 * and a UINT32-ID of '0x0017002F'.
304 * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
305 * OID-prefix: 1.2.840.113556.1.5.7000
306 * and a value: 47 => 0x2F
307 * - the mapping table gives a UINT32-prefix: 0x00170000
308 * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
310 * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
311 * array. The following are the default mappings of w2k3
313 * OID-prefix => UINT32-Id prefix
315 * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
316 * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
317 * 1.2.840.113556.1.2.* => 0x00020000
318 * 1.2.840.113556.1.3.* => 0x00030000
319 * 2.5.5.* => 0x00080000 (attributeSyntax OID's)
320 * 1.2.840.113556.1.4.* => 0x00090000
321 * 1.2.840.113556.1.5.* => 0x000A0000
322 * 2.16.840.1.113730.3.* => 0x00140000
323 * 0.9.2342.19200300.100.1.* => 0x00150000
324 * 2.16.840.1.113730.3.1.* => 0x00160000
325 * 1.2.840.113556.1.5.7000.* => 0x00170000
326 * 2.5.21.* => 0x00180000 (attrs for SubSchema)
327 * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
328 * 2.5.20.* => 0x001A0000
329 * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
330 * 2.16.840.1.113730.3.2.* => 0x001C0000
331 * 1.3.6.1.4.1.250.1.* => 0x001D0000
332 * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
333 * 0.9.2342.19200300.100.4.* => 0x001F0000
335 * Here's a list of used 'attributeSyntax' OID's
337 * 2.5.5.1 => Object(DS-DN) string
338 * struct drsuapi_DsObjectIdentifier3
340 * 2.5.5.2 => OID-string
341 * => all values are represented as uint32 values in drsuapi
342 * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
343 * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
344 * are returned as attribute names
346 * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
348 * 2.5.5.5 => String(IA5) case-sensitive string
350 * 2.5.5.6 => String(Numeric)
351 * => eg. internationalISDNNumber
353 * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
354 * => e.g. wellKnownObjects
360 * 2.5.5.10 => DATA_BLOB
363 * 2.5.5.11 => LDAP timestring
366 * 2.5.5.12 => String(Unicode) case-insensitive string
367 * => 'standard strings'
369 * 2.5.5.13 => Object(Presentation-Address) string
370 * => used in objectClass applicationEntity
372 * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
375 * 2.5.5.15 => ntSecurityDescriptor
379 * 2.5.5.17 => dom_sid
381 typedef [nopush
,nopull
] struct {
382 [range(0,10000),value
(ndr_size_drsuapi_DsReplicaOID_oid
(oid
, 0))] uint32 __ndr_size
;
383 [size_is(__ndr_size
),charset
(DOS
)] uint8
*oid
; /* it's encoded with asn1_write_OID_String() */
384 } drsuapi_DsReplicaOID
;
388 drsuapi_DsReplicaOID oid
;
389 } drsuapi_DsReplicaOIDMapping
;
391 typedef [public] struct {
392 [range(0,0x100000)] uint32 num_mappings
;
393 [size_is(num_mappings
)] drsuapi_DsReplicaOIDMapping
*mappings
;
394 } drsuapi_DsReplicaOIDMapping_Ctr
;
396 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
397 DRSUAPI_OBJECTCLASS_top
= 0x00010000,
398 DRSUAPI_OBJECTCLASS_classSchema
= 0x0003000d,
399 DRSUAPI_OBJECTCLASS_attributeSchema
= 0x0003000e
400 } drsuapi_DsObjectClassId
;
402 typedef [flag
(NDR_PAHEX
),v1_enum,public] enum {
403 DRSUAPI_ATTRIBUTE_objectClass
= 0x00000000,
404 DRSUAPI_ATTRIBUTE_description
= 0x0000000d,
405 DRSUAPI_ATTRIBUTE_member
= 0x0000001f,
406 DRSUAPI_ATTRIBUTE_instanceType
= 0x00020001,
407 DRSUAPI_ATTRIBUTE_whenCreated
= 0x00020002,
408 DRSUAPI_ATTRIBUTE_possSuperiors
= 0x00020008,
409 DRSUAPI_ATTRIBUTE_hasMasterNCs
= 0x0002000e,
410 DRSUAPI_ATTRIBUTE_subClassOf
= 0x00020015,
411 DRSUAPI_ATTRIBUTE_governsID
= 0x00020016,
412 DRSUAPI_ATTRIBUTE_mustContain
= 0x00020018,
413 DRSUAPI_ATTRIBUTE_mayContain
= 0x00020019,
414 DRSUAPI_ATTRIBUTE_attributeID
= 0x0002001e,
415 DRSUAPI_ATTRIBUTE_attributeSyntax
= 0x00020020,
416 DRSUAPI_ATTRIBUTE_isSingleValued
= 0x00020021,
417 DRSUAPI_ATTRIBUTE_rangeLower
= 0x00020022,
418 DRSUAPI_ATTRIBUTE_rangeUpper
= 0x00020023,
419 DRSUAPI_ATTRIBUTE_dMDLocation
= 0x00020024,
420 DRSUAPI_ATTRIBUTE_objectVersion
= 0x0002004c,
421 DRSUAPI_ATTRIBUTE_invocationId
= 0x00020073,
422 DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly
= 0x000200a9,
423 DRSUAPI_ATTRIBUTE_adminDisplayName
= 0x000200c2,
424 DRSUAPI_ATTRIBUTE_adminDescription
= 0x000200e2,
425 DRSUAPI_ATTRIBUTE_oMSyntax
= 0x000200e7,
426 DRSUAPI_ATTRIBUTE_ntSecurityDescriptor
= 0x00020119,
427 DRSUAPI_ATTRIBUTE_searchFlags
= 0x0002014e,
428 DRSUAPI_ATTRIBUTE_auxiliaryClass
= 0x0002015f,
429 DRSUAPI_ATTRIBUTE_lDAPDisplayName
= 0x000201cc,
430 DRSUAPI_ATTRIBUTE_name
= 0x00090001,
431 DRSUAPI_ATTRIBUTE_userAccountControl
= 0x00090008,
432 DRSUAPI_ATTRIBUTE_currentValue
= 0x0009001b,
433 DRSUAPI_ATTRIBUTE_homeDirectory
= 0x0009002c,
434 DRSUAPI_ATTRIBUTE_homeDrive
= 0x0009002d,
435 DRSUAPI_ATTRIBUTE_scriptPath
= 0x0009003e,
436 DRSUAPI_ATTRIBUTE_profilePath
= 0x0009008b,
437 DRSUAPI_ATTRIBUTE_objectSid
= 0x00090092,
438 DRSUAPI_ATTRIBUTE_schemaIDGUID
= 0x00090094,
439 DRSUAPI_ATTRIBUTE_dBCSPwd
= 0x00090037,/* lmPwdHash */
440 DRSUAPI_ATTRIBUTE_logonHours
= 0x00090040,
441 DRSUAPI_ATTRIBUTE_userWorkstations
= 0x00090056,
442 DRSUAPI_ATTRIBUTE_unicodePwd
= 0x0009005a,/* ntPwdHash */
443 DRSUAPI_ATTRIBUTE_ntPwdHistory
= 0x0009005e,
444 DRSUAPI_ATTRIBUTE_priorValue
= 0x00090064,
445 DRSUAPI_ATTRIBUTE_supplementalCredentials
= 0x0009007d,
446 DRSUAPI_ATTRIBUTE_trustAuthIncoming
= 0x00090081,
447 DRSUAPI_ATTRIBUTE_trustAuthOutgoing
= 0x00090087,
448 DRSUAPI_ATTRIBUTE_lmPwdHistory
= 0x000900a0,
449 DRSUAPI_ATTRIBUTE_systemPossSuperiors
= 0x000900c3,
450 DRSUAPI_ATTRIBUTE_systemMayContain
= 0x000900c4,
451 DRSUAPI_ATTRIBUTE_systemMustContain
= 0x000900c5,
452 DRSUAPI_ATTRIBUTE_sAMAccountName
= 0x000900dd,
453 DRSUAPI_ATTRIBUTE_sAMAccountType
= 0x0009012e,
454 DRSUAPI_ATTRIBUTE_fSMORoleOwner
= 0x00090171,
455 DRSUAPI_ATTRIBUTE_systemFlags
= 0x00090177,
456 DRSUAPI_ATTRIBUTE_serverReference
= 0x00090203,
457 DRSUAPI_ATTRIBUTE_serverReferenceBL
= 0x00090204,
458 DRSUAPI_ATTRIBUTE_initialAuthIncoming
= 0x0009021b,
459 DRSUAPI_ATTRIBUTE_initialAuthOutgoing
= 0x0009021c,
460 DRSUAPI_ATTRIBUTE_wellKnownObjects
= 0x0009026a,
461 DRSUAPI_ATTRIBUTE_dNSHostName
= 0x0009026b,
462 DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet
= 0x0009027f,
463 DRSUAPI_ATTRIBUTE_userPrincipalName
= 0x00090290,
464 DRSUAPI_ATTRIBUTE_groupType
= 0x000902ee,
465 DRSUAPI_ATTRIBUTE_servicePrincipalName
= 0x00090303,
466 DRSUAPI_ATTRIBUTE_objectCategory
= 0x0009030e,
467 DRSUAPI_ATTRIBUTE_gPLink
= 0x0009037b,
468 DRSUAPI_ATTRIBUTE_msDS_Behavior_Version
= 0x000905b3,
469 DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber
= 0x000906f6,
470 DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs
= 0x0009071c,
471 DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs
= 0x0009072c
472 } drsuapi_DsAttributeId
;
475 [value
(1)] uint32
version;
476 [value
(0)] uint32 reserved1
;
477 [range(1,0x100000)] uint32 num_attids
;
478 [size_is(num_attids
)] drsuapi_DsAttributeId attids
[];
479 } drsuapi_DsPartialAttributeSet
;
482 GUID destination_dsa_guid
;
483 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
484 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
485 drsuapi_DsReplicaHighWaterMark highwatermark
;
486 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
487 drsuapi_DsReplicaNeighbourFlags replica_flags
;
488 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
489 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
490 drsuapi_DsExtendedOperation extended_op
;
492 drsuapi_DsPartialAttributeSet
*partial_attribute_set
;
493 drsuapi_DsPartialAttributeSet
*partial_attribute_set_ex
;
494 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
495 } drsuapi_DsGetNCChangesRequest8
;
498 GUID destination_dsa_guid
;
499 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
500 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
501 drsuapi_DsReplicaHighWaterMark highwatermark
;
502 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
503 drsuapi_DsReplicaNeighbourFlags replica_flags
;
504 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
505 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
506 drsuapi_DsExtendedOperation extended_op
;
508 drsuapi_DsPartialAttributeSet
*partial_attribute_set
;
509 drsuapi_DsPartialAttributeSet
*partial_attribute_set_ex
;
510 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
512 } drsuapi_DsGetNCChangesRequest10
;
514 typedef [switch_type(int32
)] union {
515 [case(5)] drsuapi_DsGetNCChangesRequest5 req5
;
516 [case(8)] drsuapi_DsGetNCChangesRequest8 req8
;
517 [case(10)] drsuapi_DsGetNCChangesRequest10 req10
;
518 } drsuapi_DsGetNCChangesRequest
;
520 typedef [public] struct {
521 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
522 hyper highest_usn
; /* updated after a full replication cycle */
523 NTTIME last_sync_success
;
524 } drsuapi_DsReplicaCursor2
;
527 [value
(2)] uint32
version;
528 [value
(0)] uint32 reserved1
;
529 [range(0,0x100000)] uint32 count
;
530 [value
(0)] uint32 reserved2
;
531 [size_is(count
)] drsuapi_DsReplicaCursor2 cursors
[];
532 } drsuapi_DsReplicaCursor2CtrEx
;
534 /* Generic DATA_BLOB values */
536 [range(0,10485760),value
(ndr_size_DATA_BLOB
(0,blob
,0))] uint32 __ndr_size
;
538 } drsuapi_DsAttributeValue
;
541 [range(0,10485760)] uint32 num_values
;
542 [size_is(num_values
)] drsuapi_DsAttributeValue
*values
;
543 } drsuapi_DsAttributeValueCtr
;
545 /* DN String values */
546 typedef [public,gensize
] struct {
547 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3
(r
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 __ndr_size
;
548 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
551 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
552 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
553 } drsuapi_DsReplicaObjectIdentifier3
;
555 typedef [public,gensize
] struct {
556 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary
(r
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 __ndr_size
;
557 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
560 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
561 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
562 [value
(binary.length
+ 4)] uint32 __ndr_size_binary
;
563 [flag
(NDR_REMAINING
)] DATA_BLOB binary
;
564 } drsuapi_DsReplicaObjectIdentifier3Binary
;
566 typedef [public] struct {
567 drsuapi_DsAttributeId attid
;
568 drsuapi_DsAttributeValueCtr value_ctr
;
569 } drsuapi_DsReplicaAttribute
;
572 [range(0,1048576)] uint32 num_attributes
;
573 [size_is(num_attributes
)] drsuapi_DsReplicaAttribute
*attributes
;
574 } drsuapi_DsReplicaAttributeCtr
;
576 typedef [public] bitmap
{
577 DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER
= 0x00000001,
578 DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC
= 0x00000002,
579 DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY
= 0x00010000
580 } drsuapi_DsReplicaObjectFlags
;
582 typedef [public] struct {
583 drsuapi_DsReplicaObjectIdentifier
*identifier
;
584 drsuapi_DsReplicaObjectFlags flags
;
585 drsuapi_DsReplicaAttributeCtr attribute_ctr
;
586 } drsuapi_DsReplicaObject
;
590 NTTIME_1sec originating_change_time
;
591 GUID originating_invocation_id
;
592 hyper originating_usn
;
593 } drsuapi_DsReplicaMetaData
;
595 typedef [public] struct {
596 [range(0,1048576)] uint32 count
;
597 [size_is(count
)] drsuapi_DsReplicaMetaData meta_data
[];
598 } drsuapi_DsReplicaMetaDataCtr
;
600 typedef [public,noprint
] struct {
601 drsuapi_DsReplicaObjectListItemEx
*next_object
;
602 drsuapi_DsReplicaObject
object;
603 boolean32 is_nc_prefix
;
604 GUID
*parent_object_guid
;
605 drsuapi_DsReplicaMetaDataCtr
*meta_data_ctr
;
606 } drsuapi_DsReplicaObjectListItemEx
;
608 typedef [public,gensize
] struct {
609 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
610 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
611 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
612 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
613 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
614 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
615 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
616 drsuapi_DsExtendedError extended_ret
; /* w2k sends the nc_object_count value here */
618 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
619 [value
(ndr_size_drsuapi_DsGetNCChangesCtr1
(r
,ndr
->iconv_convenience
,ndr
->flags
)+55)] uint32 __ndr_size
;
620 drsuapi_DsReplicaObjectListItemEx
*first_object
;
622 } drsuapi_DsGetNCChangesCtr1
;
625 * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
626 * isn't there it means the value is deleted
628 typedef [public] bitmap
{
629 DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
= 0x00000001
630 } drsuapi_DsLinkedAttributeFlags
;
632 typedef [public] struct {
633 drsuapi_DsReplicaObjectIdentifier
*identifier
;
634 drsuapi_DsAttributeId attid
;
635 drsuapi_DsAttributeValue value
;
636 drsuapi_DsLinkedAttributeFlags flags
;
637 NTTIME_1sec originating_add_time
;
638 drsuapi_DsReplicaMetaData meta_data
;
639 } drsuapi_DsReplicaLinkedAttribute
;
641 /* [MS-DRSR] section 4.1.10.2.11 DRS_MSG_GETCHGREPLY_V6 */
642 typedef [public,gensize
] struct {
643 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
644 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
645 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
646 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
647 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
648 drsuapi_DsReplicaCursor2CtrEx
*uptodateness_vector
;
649 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
650 drsuapi_DsExtendedError extended_ret
;
652 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
653 [value
(ndr_size_drsuapi_DsGetNCChangesCtr6
(r
,ndr
->iconv_convenience
,ndr
->flags
)+55)] uint32 __ndr_size
;
654 drsuapi_DsReplicaObjectListItemEx
*first_object
;
656 uint32 nc_object_count
; /* estimated amount of objects in the whole NC */
657 uint32 nc_linked_attributes_count
; /* estimated amount of linked values in the whole NC */
658 [range(0,1048576)] uint32 linked_attributes_count
;
659 [size_is(linked_attributes_count
)] drsuapi_DsReplicaLinkedAttribute
*linked_attributes
;
661 } drsuapi_DsGetNCChangesCtr6
;
663 typedef [public] struct {
664 [subcontext
(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1
;
665 } drsuapi_DsGetNCChangesCtr1TS
;
667 typedef [public] struct {
668 [subcontext
(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6
;
669 } drsuapi_DsGetNCChangesCtr6TS
;
671 typedef [nopush
] struct {
672 uint32 decompressed_length
;
673 uint32 compressed_length
;
674 [subcontext
(4),subcontext_size
(compressed_length
),
675 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
676 drsuapi_DsGetNCChangesCtr1TS
*ts
;
677 } drsuapi_DsGetNCChangesMSZIPCtr1
;
679 typedef [nopush
] struct {
680 uint32 decompressed_length
;
681 uint32 compressed_length
;
682 [subcontext
(4),subcontext_size
(compressed_length
),
683 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
684 drsuapi_DsGetNCChangesCtr6TS
*ts
;
685 } drsuapi_DsGetNCChangesMSZIPCtr6
;
687 typedef [nopush
] struct {
688 uint32 decompressed_length
;
689 uint32 compressed_length
;
690 [subcontext
(4),subcontext_size
(compressed_length
),
691 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
692 drsuapi_DsGetNCChangesCtr1TS
*ts
;
693 } drsuapi_DsGetNCChangesXPRESSCtr1
;
695 typedef [nopush
] struct {
696 uint32 decompressed_length
;
697 uint32 compressed_length
;
698 [subcontext
(4),subcontext_size
(compressed_length
),
699 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
700 drsuapi_DsGetNCChangesCtr6TS
*ts
;
701 } drsuapi_DsGetNCChangesXPRESSCtr6
;
703 typedef [enum16bit
] enum {
704 DRSUAPI_COMPRESSION_TYPE_MSZIP
= 2,
705 DRSUAPI_COMPRESSION_TYPE_XPRESS
= 3
706 } drsuapi_DsGetNCChangesCompressionType
;
708 typedef [nodiscriminant
,flag
(NDR_PAHEX
)] union {
709 [case(1|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1
;
710 [case(6|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6
;
711 [case(1|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1
;
712 [case(6|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6
;
713 } drsuapi_DsGetNCChangesCompressedCtr
;
716 drsuapi_DsGetNCChangesMSZIPCtr1 mszip1
;
717 } drsuapi_DsGetNCChangesCtr2
;
720 [range(0,6)] int32 level
;
721 [range(2,3)] drsuapi_DsGetNCChangesCompressionType type
;
722 [switch_is(level |
(type
<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr
;
723 } drsuapi_DsGetNCChangesCtr7
;
725 typedef [switch_type(int32
)] union {
726 [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1
;
727 [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2
;
728 [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6
;
729 [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7
;
730 } drsuapi_DsGetNCChangesCtr
;
732 WERROR drsuapi_DsGetNCChanges
(
733 [in] policy_handle
*bind_handle
,
735 [in,ref,switch_is(level
)] drsuapi_DsGetNCChangesRequest
*req
,
736 [out,ref] int32
*level_out
,
737 [out,ref,switch_is(*level_out
)] drsuapi_DsGetNCChangesCtr
*ctr
742 /* [MS-DRSR] 4.1.26 */
744 DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION
= 0x00000001,
745 DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK
= 0x00000002,
746 DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE
= 0x00000004,
747 DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE
= 0x00000008,
748 DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE
= 0x00000010
749 } drsuapi_DsReplicaUpdateRefsOptions
;
752 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
753 [ref,charset
(DOS
),string] uint8
*dest_dsa_dns_name
;
755 drsuapi_DsReplicaUpdateRefsOptions options
;
756 } drsuapi_DsReplicaUpdateRefsRequest1
;
758 typedef [switch_type(int32
)] union {
759 [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1
;
760 } drsuapi_DsReplicaUpdateRefsRequest
;
762 WERROR drsuapi_DsReplicaUpdateRefs
(
763 [in] policy_handle
*bind_handle
,
765 [in,switch_is(level
)] drsuapi_DsReplicaUpdateRefsRequest req
771 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
= 0x00000001,
772 DRSUAPI_DS_REPLICA_ADD_WRITEABLE
= 0x00000002
774 } drsuapi_DsReplicaAddOptions
;
778 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
779 [charset
(UTF16
),string] uint16
*source_dsa_address
;
781 drsuapi_DsReplicaAddOptions options
;
782 } drsuapi_DsReplicaAddRequest1
;
785 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
786 drsuapi_DsReplicaObjectIdentifier
*source_dsa_dn
;
787 drsuapi_DsReplicaObjectIdentifier
*transport_dn
;
788 [charset
(UTF16
),string] uint16
*source_dsa_address
;
790 drsuapi_DsReplicaAddOptions options
;
791 } drsuapi_DsReplicaAddRequest2
;
793 typedef [switch_type(int32
)] union {
794 [case(1)] drsuapi_DsReplicaAddRequest1 req1
;
795 [case(2)] drsuapi_DsReplicaAddRequest2 req2
;
796 } drsuapi_DsReplicaAddRequest
;
798 WERROR drsuapi_DsReplicaAdd
(
799 [in] policy_handle
*bind_handle
,
801 [in,switch_is(level
)] drsuapi_DsReplicaAddRequest req
808 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
= 0x00000001,
809 DRSUAPI_DS_REPLICA_ADD_WRITEABLE
= 0x00000002
811 } drsuapi_DsReplicaDeleteOptions
;
815 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
816 [charset
(UTF16
),string] uint16
*source_dsa_address
;
817 drsuapi_DsReplicaDeleteOptions options
;
818 } drsuapi_DsReplicaDelRequest1
;
820 typedef [switch_type(int32
)] union {
821 [case(1)] drsuapi_DsReplicaDelRequest1 req1
;
822 } drsuapi_DsReplicaDelRequest
;
824 WERROR drsuapi_DsReplicaDel
(
825 [in] policy_handle
*bind_handle
,
827 [in,switch_is(level
)] drsuapi_DsReplicaDelRequest req
833 DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION
= 0x00000001,
834 DRSUAPI_DS_REPLICA_ADD_WRITEABLE
= 0x00000002
836 } drsuapi_DsReplicaModifyOptions
;
840 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
842 [charset
(UTF16
),string] uint16
*source_dra_address
;
844 uint32 replica_flags
;
845 uint32 modify_fields
;
846 drsuapi_DsReplicaModifyOptions options
;
847 } drsuapi_DsReplicaModRequest1
;
849 typedef [switch_type(int32
)] union {
850 [case(1)] drsuapi_DsReplicaModRequest1 req1
;
851 } drsuapi_DsReplicaModRequest
;
853 WERROR drsuapi_DsReplicaMod
(
854 [in] policy_handle
*bind_handle
,
856 [in,switch_is(level
)] drsuapi_DsReplicaModRequest req
861 [todo
] WERROR DRSUAPI_VERIFY_NAMES
();
866 /* how are type 4 and 7 different from 2 and 3 ? */
867 typedef [v1_enum] enum {
868 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS
= 1,
869 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS
= 2,
870 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS
= 3,
871 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2
= 4,
872 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS
= 5,
873 DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS
= 6,
874 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2
= 7
875 } drsuapi_DsMembershipType
;
879 [range(0,10000)] uint32 num_memberships
;
880 [range(0,10000)] uint32 num_sids
;
881 [size_is(num_memberships
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
882 [size_is(num_memberships
)] samr_GroupAttrs
*group_attrs
;
883 [size_is(num_sids
)] dom_sid28
**sids
;
884 } drsuapi_DsGetMembershipsCtr1
;
886 typedef [switch_type(int32
)] union {
887 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
888 } drsuapi_DsGetMembershipsCtr
;
890 const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR
= 0x1;
893 [range(1,10000)] uint32 count
;
894 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
896 drsuapi_DsMembershipType type
;
897 drsuapi_DsReplicaObjectIdentifier
*domain
;
898 } drsuapi_DsGetMembershipsRequest1
;
900 typedef [switch_type(int32
)] union {
901 [case(1)] drsuapi_DsGetMembershipsRequest1 req1
;
902 } drsuapi_DsGetMembershipsRequest
;
904 [todo
] WERROR drsuapi_DsGetMemberships
(
905 [in] policy_handle
*bind_handle
,
907 [in,ref] [switch_is(level
)] drsuapi_DsGetMembershipsRequest
*req
,
908 [out,ref] int32
*level_out
,
909 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMembershipsCtr
*ctr
914 [todo
] WERROR DRSUAPI_INTER_DOMAIN_MOVE
();
921 [range(0,0x00A00000)] uint32 length
;
922 [size_is(length
)] uint8
*data
;
923 } drsuapi_DsGetNT4ChangeLogRequest1
;
925 typedef [switch_type(uint32
)] union {
926 [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1
;
927 } drsuapi_DsGetNT4ChangeLogRequest
;
930 [range(0,0x00A00000)] uint32 length1
;
931 [range(0,0x00A00000)] uint32 length2
;
939 [size_is(length1
)] uint8
*data1
;
940 [size_is(length2
)] uint8
*data2
;
941 } drsuapi_DsGetNT4ChangeLogInfo1
;
943 typedef [switch_type(uint32
)] union {
944 [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1
;
945 } drsuapi_DsGetNT4ChangeLogInfo
;
947 [todo
] WERROR drsuapi_DsGetNT4ChangeLog
(
948 [in] policy_handle
*bind_handle
,
950 [in,ref] [switch_is(level
)] drsuapi_DsGetNT4ChangeLogRequest
*req
,
951 [out,ref] uint32
*level_out
,
952 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetNT4ChangeLogInfo
*info
957 typedef [v1_enum] enum {
958 DRSUAPI_DS_NAME_STATUS_OK
= 0,
959 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
= 1,
960 DRSUAPI_DS_NAME_STATUS_NOT_FOUND
= 2,
961 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
= 3,
962 DRSUAPI_DS_NAME_STATUS_NO_MAPPING
= 4,
963 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
= 5,
964 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
= 6,
965 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
= 7
966 } drsuapi_DsNameStatus
;
968 typedef [v1_enum] enum {
969 DRSUAPI_DS_NAME_FLAG_NO_FLAGS
= 0x0,
970 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
= 0x1,
971 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
= 0x2,
972 DRSUAPI_DS_NAME_FLAG_GCVERIFY
= 0x4,
973 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
= 0x8
974 } drsuapi_DsNameFlags
;
976 typedef [v1_enum] enum {
977 DRSUAPI_DS_NAME_FORMAT_UNKNOWN
= 0,
978 DRSUAPI_DS_NAME_FORMAT_FQDN_1779
= 1,
979 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
= 2,
980 DRSUAPI_DS_NAME_FORMAT_DISPLAY
= 3,
981 DRSUAPI_DS_NAME_FORMAT_GUID
= 6,
982 DRSUAPI_DS_NAME_FORMAT_CANONICAL
= 7,
983 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
= 8,
984 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
= 9,
985 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
= 10,
986 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
= 11,
987 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
= 12
988 } drsuapi_DsNameFormat
;
991 [string,charset
(UTF16
)] uint16
*str
;
992 } drsuapi_DsNameString
;
995 uint32 codepage
; /* 0x000004e4 - 1252 is german codepage*/
996 uint32 language
; /* 0x00000407 - german language ID*/
997 drsuapi_DsNameFlags format_flags
;
998 drsuapi_DsNameFormat format_offered
;
999 drsuapi_DsNameFormat format_desired
;
1000 [range(1,10000)] uint32 count
;
1001 [size_is(count
)] drsuapi_DsNameString
*names
;
1002 } drsuapi_DsNameRequest1
;
1004 typedef [switch_type(int32
)] union {
1005 [case(1)] drsuapi_DsNameRequest1 req1
;
1006 } drsuapi_DsNameRequest
;
1009 drsuapi_DsNameStatus status
;
1010 [charset
(UTF16
),string] uint16
*dns_domain_name
;
1011 [charset
(UTF16
),string] uint16
*result_name
;
1012 } drsuapi_DsNameInfo1
;
1016 [size_is(count
)] drsuapi_DsNameInfo1
*array
;
1017 } drsuapi_DsNameCtr1
;
1019 typedef [switch_type(int32
)] union {
1020 [case(1)] drsuapi_DsNameCtr1
*ctr1
;
1021 } drsuapi_DsNameCtr
;
1023 WERROR drsuapi_DsCrackNames
(
1024 [in] policy_handle
*bind_handle
,
1026 [in,ref,switch_is(level
)] drsuapi_DsNameRequest
*req
,
1027 [out,ref] int32
*level_out
,
1028 [out,ref,switch_is(*level_out
)] drsuapi_DsNameCtr
*ctr
1033 typedef [v1_enum] enum {
1034 DRSUAPI_DS_SPN_OPERATION_ADD
= 0,
1035 DRSUAPI_DS_SPN_OPERATION_REPLACE
= 1,
1036 DRSUAPI_DS_SPN_OPERATION_DELETE
= 2
1037 } drsuapi_DsSpnOperation
;
1040 drsuapi_DsSpnOperation operation
;
1042 [charset
(UTF16
),string] uint16
*object_dn
;
1043 [range(0,10000)] uint32 count
;
1044 [size_is(count
)] drsuapi_DsNameString
*spn_names
;
1045 } drsuapi_DsWriteAccountSpnRequest1
;
1047 typedef [switch_type(int32
)] union {
1048 [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1
;
1049 } drsuapi_DsWriteAccountSpnRequest
;
1053 } drsuapi_DsWriteAccountSpnResult1
;
1055 typedef [switch_type(int32
)] union {
1056 [case(1)] drsuapi_DsWriteAccountSpnResult1 res1
;
1057 } drsuapi_DsWriteAccountSpnResult
;
1059 WERROR drsuapi_DsWriteAccountSpn
(
1060 [in] policy_handle
*bind_handle
,
1062 [in,ref,switch_is(level
)] drsuapi_DsWriteAccountSpnRequest
*req
,
1063 [out,ref] int32
*level_out
,
1064 [out,ref,switch_is(*level_out
)] drsuapi_DsWriteAccountSpnResult
*res
1070 [charset
(UTF16
),string] uint16
*server_dn
;
1071 [charset
(UTF16
),string] uint16
*domain_dn
;
1073 } drsuapi_DsRemoveDSServerRequest1
;
1075 typedef [switch_type(int32
)] union {
1076 [case(1)] drsuapi_DsRemoveDSServerRequest1 req1
;
1077 } drsuapi_DsRemoveDSServerRequest
;
1080 boolean32 last_dc_in_domain
;
1081 } drsuapi_DsRemoveDSServerResult1
;
1083 typedef [switch_type(int32
)] union {
1084 [case(1)] drsuapi_DsRemoveDSServerResult1 res1
;
1085 } drsuapi_DsRemoveDSServerResult
;
1087 WERROR drsuapi_DsRemoveDSServer
(
1088 [in] policy_handle
*bind_handle
,
1090 [in,ref,switch_is(level
)] drsuapi_DsRemoveDSServerRequest
*req
,
1091 [out,ref] int32
*level_out
,
1092 [out,ref,switch_is(*level_out
)] drsuapi_DsRemoveDSServerResult
*res
1097 [todo
] WERROR DRSUAPI_REMOVE_DS_DOMAIN
();
1102 [charset
(UTF16
),string] uint16
*domain_name
; /* netbios or dns */
1103 int32 level
; /* specifies the switch level for the request */
1104 } drsuapi_DsGetDCInfoRequest1
;
1106 typedef [switch_type(int32
)] union {
1107 [case(1)] drsuapi_DsGetDCInfoRequest1 req1
;
1108 } drsuapi_DsGetDCInfoRequest
;
1111 [charset
(UTF16
),string] uint16
*netbios_name
;
1112 [charset
(UTF16
),string] uint16
*dns_name
;
1113 [charset
(UTF16
),string] uint16
*site_name
;
1114 [charset
(UTF16
),string] uint16
*computer_dn
;
1115 [charset
(UTF16
),string] uint16
*server_dn
;
1118 } drsuapi_DsGetDCInfo1
;
1121 [range(0,10000)] uint32 count
;
1122 [size_is(count
)] drsuapi_DsGetDCInfo1
*array
;
1123 } drsuapi_DsGetDCInfoCtr1
;
1126 [charset
(UTF16
),string] uint16
*netbios_name
;
1127 [charset
(UTF16
),string] uint16
*dns_name
;
1128 [charset
(UTF16
),string] uint16
*site_name
;
1129 [charset
(UTF16
),string] uint16
*site_dn
;
1130 [charset
(UTF16
),string] uint16
*computer_dn
;
1131 [charset
(UTF16
),string] uint16
*server_dn
;
1132 [charset
(UTF16
),string] uint16
*ntds_dn
;
1140 } drsuapi_DsGetDCInfo2
;
1143 [range(0,10000)] uint32 count
;
1144 [size_is(count
)] drsuapi_DsGetDCInfo2
*array
;
1145 } drsuapi_DsGetDCInfoCtr2
;
1148 [charset
(UTF16
),string] uint16
*netbios_name
;
1149 [charset
(UTF16
),string] uint16
*dns_name
;
1150 [charset
(UTF16
),string] uint16
*site_name
;
1151 [charset
(UTF16
),string] uint16
*site_dn
;
1152 [charset
(UTF16
),string] uint16
*computer_dn
;
1153 [charset
(UTF16
),string] uint16
*server_dn
;
1154 [charset
(UTF16
),string] uint16
*ntds_dn
;
1163 } drsuapi_DsGetDCInfo3
;
1166 [range(0,10000)] uint32 count
;
1167 [size_is(count
)] drsuapi_DsGetDCInfo3
*array
;
1168 } drsuapi_DsGetDCInfoCtr3
;
1171 * this represents an active connection to the
1172 * Directory System Agent (DSA)
1173 * this can be via LDAP or DRSUAPI
1176 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1178 uint32 connection_time
; /* in seconds */
1183 * client_account can be the following:
1184 * "W2K3\Administrator"
1185 * "Administrator@W2K3"
1186 * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
1190 [charset
(UTF16
),string] uint16
*client_account
;
1191 } drsuapi_DsGetDCConnection01
;
1194 [range(0,10000)] uint32 count
;
1195 [size_is(count
)] drsuapi_DsGetDCConnection01
*array
;
1196 } drsuapi_DsGetDCConnectionCtr01
;
1198 typedef [v1_enum] enum {
1199 DRSUAPI_DC_INFO_CTR_1
= 1,
1200 DRSUAPI_DC_INFO_CTR_2
= 2,
1201 DRSUAPI_DC_INFO_CTR_3
= 3,
1202 DRSUAPI_DC_CONNECTION_CTR_01
= -1
1203 } drsuapi_DsGetDCInfoCtrLevels
;
1205 typedef [switch_type(int32
)] union {
1206 [case(DRSUAPI_DC_INFO_CTR_1
)] drsuapi_DsGetDCInfoCtr1 ctr1
;
1207 [case(DRSUAPI_DC_INFO_CTR_2
)] drsuapi_DsGetDCInfoCtr2 ctr2
;
1208 [case(DRSUAPI_DC_INFO_CTR_3
)] drsuapi_DsGetDCInfoCtr3 ctr3
;
1209 [case(DRSUAPI_DC_CONNECTION_CTR_01
)] drsuapi_DsGetDCConnectionCtr01 ctr01
;
1210 } drsuapi_DsGetDCInfoCtr
;
1212 WERROR drsuapi_DsGetDomainControllerInfo
(
1213 [in] policy_handle
*bind_handle
,
1215 [in,ref,switch_is(level
)] drsuapi_DsGetDCInfoRequest
*req
,
1216 [out,ref] int32
*level_out
,
1217 [out,ref,switch_is(*level_out
)] drsuapi_DsGetDCInfoCtr
*ctr
1222 typedef [public,noprint
] struct {
1223 drsuapi_DsReplicaObjectListItem
*next_object
;
1224 drsuapi_DsReplicaObject
object;
1225 } drsuapi_DsReplicaObjectListItem
;
1228 * The DsAddEntry() call which creates a nTDSDSA object,
1229 * also adds a servicePrincipalName in the following form
1230 * to the computer account of the new domain controller
1231 * referenced by the "serverReferenece" attribute.
1233 * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
1235 * also note that the "serverReference" isn't added to the new object!
1237 const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID
= "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
1240 * please note the the current idl
1241 * for DsAddEntry does only parse
1242 * what I saw between 2 w2k3 boxes
1243 * in my dssync experiments I got some other replies
1244 * so all I want to say is that this is very incomplete yet...
1248 drsuapi_DsReplicaObjectListItem first_object
;
1249 } drsuapi_DsAddEntryRequest2
;
1251 typedef [switch_type(int32
)] union {
1252 [case(2)] drsuapi_DsAddEntryRequest2 req2
;
1253 } drsuapi_DsAddEntryRequest
;
1260 } drsuapi_DsAddEntryErrorInfoX
;
1263 [range(0,10485760)] uint32 size
;
1264 [size_is(size
)] uint8
*data
;
1265 } drsuapi_DsAddEntryExtraErrorBuffer
;
1268 drsuapi_DsAddEntryErrorInfoX error
;
1269 drsuapi_DsAttributeId attid
;
1271 drsuapi_DsAddEntryExtraErrorBuffer buffer
;
1272 } drsuapi_DsAddEntryExtraError1
;
1274 typedef /*[noprint]*/ struct {
1275 drsuapi_DsAddEntryErrorListItem1
*next
;
1276 drsuapi_DsAddEntryExtraError1 error
;
1277 } drsuapi_DsAddEntryErrorListItem1
;
1280 drsuapi_DsReplicaObjectIdentifier
*id;
1282 drsuapi_DsAddEntryErrorListItem1 first
;
1283 } drsuapi_DsAddEntryErrorInfo1
;
1285 typedef [switch_type(uint32
)] union {
1286 [case(1)] drsuapi_DsAddEntryErrorInfo1 error1
;
1287 /* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
1288 [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
1289 */ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX
;
1290 [case(5)] drsuapi_DsAddEntryErrorInfoX errorX
;
1291 [case(6)] drsuapi_DsAddEntryErrorInfoX errorX
;
1292 [case(7)] drsuapi_DsAddEntryErrorInfoX errorX
;
1293 } drsuapi_DsAddEntryErrorInfo
;
1298 [switch_is(level
)] drsuapi_DsAddEntryErrorInfo
*info
;
1299 } drsuapi_DsAddEntryError1
;
1301 typedef [switch_type(uint32
)] union {
1302 [case(1)] drsuapi_DsAddEntryError1 info1
;
1303 } drsuapi_DsAddEntryError
;
1308 } drsuapi_DsReplicaObjectIdentifier2
;
1311 drsuapi_DsReplicaObjectIdentifier
*id;
1313 drsuapi_DsAddEntryErrorInfoX error
;
1314 [range(0,10000)] uint32 count
;
1315 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1316 } drsuapi_DsAddEntryCtr2
;
1319 drsuapi_DsReplicaObjectIdentifier
*id;
1321 [switch_is(level
)] drsuapi_DsAddEntryError
*error
;
1322 [range(0,10000)] uint32 count
;
1323 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1324 } drsuapi_DsAddEntryCtr3
;
1326 typedef [switch_type(int32
)] union {
1327 [case(2)] drsuapi_DsAddEntryCtr2 ctr2
;
1328 [case(3)] drsuapi_DsAddEntryCtr3 ctr3
;
1329 } drsuapi_DsAddEntryCtr
;
1331 [public] WERROR drsuapi_DsAddEntry
(
1332 [in] policy_handle
*bind_handle
,
1334 [in,ref,switch_is(level
)] drsuapi_DsAddEntryRequest
*req
,
1335 [out,ref] int32
*level_out
,
1336 [out,ref,switch_is(*level_out
)] drsuapi_DsAddEntryCtr
*ctr
1342 DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION
= 0x00000001,
1343 DRSUAPI_DS_EXECUTE_KCC_DAMPED
= 0x00000002
1344 } drsuapi_DsExecuteKCCFlags
;
1348 drsuapi_DsExecuteKCCFlags flags
;
1349 } drsuapi_DsExecuteKCC1
;
1351 typedef [switch_type(uint32
)] union {
1352 [case(1)] drsuapi_DsExecuteKCC1 ctr1
;
1353 } drsuapi_DsExecuteKCCRequest
;
1355 WERROR drsuapi_DsExecuteKCC
(
1356 [in] policy_handle
*bind_handle
,
1358 [in, ref, switch_is(level
)] drsuapi_DsExecuteKCCRequest
*req
1363 typedef [v1_enum] enum {
1364 DRSUAPI_DS_REPLICA_GET_INFO
= 1,
1365 DRSUAPI_DS_REPLICA_GET_INFO2
= 2
1366 } drsuapi_DsReplicaGetInfoLevel
;
1368 typedef [v1_enum] enum {
1369 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
= 0,
1370 DRSUAPI_DS_REPLICA_INFO_CURSORS
= 1,
1371 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
= 2,
1372 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
= 3,
1373 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
= 4,
1374 DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
= 5,
1375 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
= 6,
1376 DRSUAPI_DS_REPLICA_INFO_CURSORS2
= 7,
1377 DRSUAPI_DS_REPLICA_INFO_CURSORS3
= 8,
1378 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
= 9,
1379 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
= 10,
1380 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
= -2,
1381 DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
= -4,
1382 DRSUAPI_DS_REPLICA_INFO_CURSORS05
= -5,
1383 DRSUAPI_DS_REPLICA_INFO_06
= -6
1384 } drsuapi_DsReplicaInfoType
;
1387 drsuapi_DsReplicaInfoType info_type
;
1388 [charset
(UTF16
),string] uint16
*object_dn
;
1390 } drsuapi_DsReplicaGetInfoRequest1
;
1393 drsuapi_DsReplicaInfoType info_type
;
1394 [charset
(UTF16
),string] uint16
*object_dn
;
1397 [charset
(UTF16
),string] uint16
*string1
;
1398 [charset
(UTF16
),string] uint16
*string2
;
1400 } drsuapi_DsReplicaGetInfoRequest2
;
1402 typedef [switch_type(drsuapi_DsReplicaGetInfoLevel
)] union {
1403 [case(DRSUAPI_DS_REPLICA_GET_INFO
)] drsuapi_DsReplicaGetInfoRequest1 req1
;
1404 [case(DRSUAPI_DS_REPLICA_GET_INFO2
)] drsuapi_DsReplicaGetInfoRequest2 req2
;
1405 } drsuapi_DsReplicaGetInfoRequest
;
1408 [charset
(UTF16
),string] uint16
*naming_context_dn
;
1409 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1410 [charset
(UTF16
),string] uint16
*source_dsa_address
;
1411 [charset
(UTF16
),string] uint16
*transport_obj_dn
;
1412 drsuapi_DsReplicaNeighbourFlags replica_flags
;
1414 GUID naming_context_obj_guid
;
1415 GUID source_dsa_obj_guid
;
1416 GUID source_dsa_invocation_id
;
1417 GUID transport_obj_guid
;
1418 hyper tmp_highest_usn
;
1420 NTTIME last_success
;
1421 NTTIME last_attempt
;
1422 WERROR result_last_attempt
;
1423 uint32 consecutive_sync_failures
;
1424 } drsuapi_DsReplicaNeighbour
;
1429 [size_is(count
)] drsuapi_DsReplicaNeighbour array
[];
1430 } drsuapi_DsReplicaNeighbourCtr
;
1435 [size_is(count
)] drsuapi_DsReplicaCursor array
[];
1436 } drsuapi_DsReplicaCursorCtr
;
1439 [charset
(UTF16
),string] uint16
*attribute_name
;
1441 NTTIME originating_change_time
;
1442 GUID originating_invocation_id
;
1443 hyper originating_usn
;
1445 } drsuapi_DsReplicaObjMetaData
;
1450 [size_is(count
)] drsuapi_DsReplicaObjMetaData array
[];
1451 } drsuapi_DsReplicaObjMetaDataCtr
;
1454 [charset
(UTF16
),string] uint16
*dsa_obj_dn
;
1456 NTTIME first_failure
;
1457 uint32 num_failures
;
1459 } drsuapi_DsReplicaKccDsaFailure
;
1464 [size_is(count
)] drsuapi_DsReplicaKccDsaFailure array
[];
1465 } drsuapi_DsReplicaKccDsaFailuresCtr
;
1468 DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
= 0,
1469 DRSUAPI_DS_REPLICA_OP_TYPE_ADD
= 1,
1470 DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
= 2,
1471 DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
= 3,
1472 DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
= 4
1473 } drsuapi_DsReplicaOpType
;
1475 typedef [switch_type(drsuapi_DsReplicaOpType
)] union {
1476 [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
)] drsuapi_DsReplicaSyncOptions sync
;
1477 [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD
)] drsuapi_DsReplicaAddOptions add
;
1478 [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
)] drsuapi_DsReplicaDeleteOptions op_delete
;
1479 [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
)] drsuapi_DsReplicaModifyOptions modify
;
1480 [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
)] drsuapi_DsReplicaUpdateRefsOptions update_refs
;
1481 [default] uint32 unknown
;
1482 } drsuapi_DsRplicaOpOptions
;
1485 NTTIME operation_start
;
1486 uint32 serial_num
; /* unique till reboot */
1488 drsuapi_DsReplicaOpType operation_type
;
1489 [switch_is(operation_type
)] drsuapi_DsRplicaOpOptions options
;
1490 [charset
(UTF16
),string] uint16
*nc_dn
;
1491 [charset
(UTF16
),string] uint16
*remote_dsa_obj_dn
;
1492 [charset
(UTF16
),string] uint16
*remote_dsa_address
;
1494 GUID remote_dsa_obj_guid
;
1495 } drsuapi_DsReplicaOp
;
1500 [size_is(count
)] drsuapi_DsReplicaOp array
[];
1501 } drsuapi_DsReplicaOpCtr
;
1504 [charset
(UTF16
),string] uint16
*attribute_name
;
1505 [charset
(UTF16
),string] uint16
*object_dn
;
1506 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1511 NTTIME originating_change_time
;
1512 GUID originating_invocation_id
;
1513 hyper originating_usn
;
1515 } drsuapi_DsReplicaAttrValMetaData
;
1519 int32 enumeration_context
;
1520 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData array
[];
1521 } drsuapi_DsReplicaAttrValMetaDataCtr
;
1525 int32 enumeration_context
;
1526 [size_is(count
)] drsuapi_DsReplicaCursor2 array
[];
1527 } drsuapi_DsReplicaCursor2Ctr
;
1530 GUID source_dsa_invocation_id
;
1532 NTTIME last_sync_success
;
1533 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1534 } drsuapi_DsReplicaCursor3
;
1538 int32 enumeration_context
;
1539 [size_is(count
)] drsuapi_DsReplicaCursor3 array
[];
1540 } drsuapi_DsReplicaCursor3Ctr
;
1543 [charset
(UTF16
),string] uint16
*attribute_name
;
1545 NTTIME originating_change_time
;
1546 GUID originating_invocation_id
;
1547 hyper originating_usn
;
1549 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1550 } drsuapi_DsReplicaObjMetaData2
;
1554 int32 enumeration_context
;
1555 [size_is(count
)] drsuapi_DsReplicaObjMetaData2 array
[];
1556 } drsuapi_DsReplicaObjMetaData2Ctr
;
1559 [charset
(UTF16
),string] uint16
*attribute_name
;
1560 [charset
(UTF16
),string] uint16
*object_dn
;
1561 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1566 NTTIME originating_change_time
;
1567 GUID originating_invocation_id
;
1568 hyper originating_usn
;
1570 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1571 } drsuapi_DsReplicaAttrValMetaData2
;
1575 int32 enumeration_context
;
1576 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData2 array
[];
1577 } drsuapi_DsReplicaAttrValMetaData2Ctr
;
1580 hyper u1
; /* session number? */
1584 NTTIME_1sec bind_time
;
1585 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1586 uint32 u5
; /* this is the same value the client used as pid in the DsBindInfoX struct */
1587 } drsuapi_DsReplicaConnection04
;
1590 [range(0,10000)] uint32 count
;
1592 [size_is(count
)] drsuapi_DsReplicaConnection04 array
[];
1593 } drsuapi_DsReplicaConnection04Ctr
;
1596 [charset
(UTF16
),string] uint16
*str1
;
1604 } drsuapi_DsReplica06
;
1607 [range(0,256)] uint32 count
;
1609 [size_is(count
)] drsuapi_DsReplica06 array
[];
1610 } drsuapi_DsReplica06Ctr
;
1612 typedef [switch_type(drsuapi_DsReplicaInfoType
)] union {
1613 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
)] drsuapi_DsReplicaNeighbourCtr
*neighbours
;
1614 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS
)] drsuapi_DsReplicaCursorCtr
*cursors
;
1615 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
)] drsuapi_DsReplicaObjMetaDataCtr
*objmetadata
;
1616 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*connectfailures
;
1617 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*linkfailures
;
1618 [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
)] drsuapi_DsReplicaOpCtr
*pendingops
;
1619 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
)] drsuapi_DsReplicaAttrValMetaDataCtr
*attrvalmetadata
;
1620 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2
)] drsuapi_DsReplicaCursor2Ctr
*cursors2
;
1621 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3
)] drsuapi_DsReplicaCursor3Ctr
*cursors3
;
1622 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
)] drsuapi_DsReplicaObjMetaData2Ctr
*objmetadata2
;
1623 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
)] drsuapi_DsReplicaAttrValMetaData2Ctr
*attrvalmetadata2
;
1624 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02
)] drsuapi_DsReplicaNeighbourCtr
*neighbours02
;
1625 [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04
)] drsuapi_DsReplicaConnection04Ctr
*connections04
;
1626 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05
)] drsuapi_DsReplicaCursorCtrEx
*cursors05
;
1627 [case(DRSUAPI_DS_REPLICA_INFO_06
)] drsuapi_DsReplica06Ctr
*i06
;
1628 } drsuapi_DsReplicaInfo
;
1630 WERROR drsuapi_DsReplicaGetInfo
(
1631 [in] policy_handle
*bind_handle
,
1632 [in] drsuapi_DsReplicaGetInfoLevel level
,
1633 [in,ref,switch_is(level
)] drsuapi_DsReplicaGetInfoRequest
*req
,
1634 [out,ref] drsuapi_DsReplicaInfoType
*info_type
,
1635 [out,ref,switch_is(*info_type
)] drsuapi_DsReplicaInfo
*info
1640 [todo
] WERROR DRSUAPI_ADD_SID_HISTORY
();
1646 [range(0,10000)] uint32 num_entries
;
1647 [size_is(num_entries
)] drsuapi_DsGetMembershipsCtr1
**ctrl_array
;
1648 } drsuapi_DsGetMemberships2Ctr1
;
1650 typedef [switch_type(int32
)] union {
1651 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
1652 } drsuapi_DsGetMemberships2Ctr
;
1655 [range(1,10000)] uint32 num_req
;
1656 [size_is(num_req
)] drsuapi_DsGetMembershipsRequest1
**req_array
;
1657 } drsuapi_DsGetMemberships2Request1
;
1659 typedef [switch_type(int32
)] union {
1660 [case(1)] drsuapi_DsGetMemberships2Request1 req1
;
1661 } drsuapi_DsGetMemberships2Request
;
1663 WERROR drsuapi_DsGetMemberships2
(
1664 [in] policy_handle
*bind_handle
,
1666 [in,ref] [switch_is(level
)] drsuapi_DsGetMemberships2Request
*req
,
1667 [out,ref] int32
*level_out
,
1668 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMemberships2Ctr
*ctr
1673 [todo
] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS
();
1677 [todo
] WERROR DRSUAPI_GET_OBJECT_EXISTENCE
();
1684 } drsuapi_DsSiteCostInfo
;
1687 [range(0,10000)] uint32 num_info
;
1688 [size_is(num_info
)] drsuapi_DsSiteCostInfo
*info
;
1690 } drsuapi_QuerySitesByCostCtr1
;
1692 typedef [switch_type(int32
)] union {
1693 [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1
;
1694 } drsuapi_QuerySitesByCostCtr
;
1697 [charset
(UTF16
),string] uint16
*site_from
;
1698 [range(1,10000)] uint32 num_req
;
1699 [size_is(num_req
)] [charset
(UTF16
),string] uint16
**site_to
;
1701 } drsuapi_QuerySitesByCostRequest1
;
1703 typedef [switch_type(int32
)] union {
1704 [case(1)] drsuapi_QuerySitesByCostRequest1 req1
;
1705 } drsuapi_QuerySitesByCostRequest
;
1707 WERROR drsuapi_QuerySitesByCost
(
1708 [in] policy_handle
*bind_handle
,
1710 [in,ref] [switch_is(level
)] drsuapi_QuerySitesByCostRequest
*req
,
1711 [out,ref] int32
*level_out
,
1712 [out,ref] [switch_is(*level_out
)] drsuapi_QuerySitesByCostCtr
*ctr