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
;
18 /* see MS-DRSR section 5.39 */
19 typedef [public,bitmap32bit
] bitmap
{
20 DRSUAPI_DRS_ASYNC_OP
= 0x00000001,
21 DRSUAPI_DRS_GETCHG_CHECK
= 0x00000002,
22 DRSUAPI_DRS_UPDATE_NOTIFICATION
= 0x00000002,
23 DRSUAPI_DRS_ADD_REF
= 0x00000004,
24 DRSUAPI_DRS_SYNC_ALL
= 0x00000008,
25 DRSUAPI_DRS_DEL_REF
= 0x00000008,
26 DRSUAPI_DRS_WRIT_REP
= 0x00000010,
27 DRSUAPI_DRS_INIT_SYNC
= 0x00000020,
28 DRSUAPI_DRS_PER_SYNC
= 0x00000040,
29 DRSUAPI_DRS_MAIL_REP
= 0x00000080,
30 DRSUAPI_DRS_ASYNC_REP
= 0x00000100,
31 DRSUAPI_DRS_IGNORE_ERROR
= 0x00000100,
32 DRSUAPI_DRS_TWOWAY_SYNC
= 0x00000200,
33 DRSUAPI_DRS_CRITICAL_ONLY
= 0x00000400,
34 DRSUAPI_DRS_GET_ANC
= 0x00000800,
35 DRSUAPI_DRS_GET_NC_SIZE
= 0x00001000,
36 DRSUAPI_DRS_LOCAL_ONLY
= 0x00001000,
37 DRSUAPI_DRS_NONGC_RO_REP
= 0x00002000,
38 DRSUAPI_DRS_SYNC_BYNAME
= 0x00004000,
39 DRSUAPI_DRS_REF_OK
= 0x00004000,
40 DRSUAPI_DRS_FULL_SYNC_NOW
= 0x00008000,
41 DRSUAPI_DRS_NO_SOURCE
= 0x00008000,
42 DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS
= 0x00010000,
43 DRSUAPI_DRS_FULL_SYNC_PACKET
= 0x00020000,
44 DRSUAPI_DRS_SYNC_REQUEUE
= 0x00040000,
45 DRSUAPI_DRS_SYNC_URGENT
= 0x00080000,
46 DRSUAPI_DRS_REF_GCSPN
= 0x00100000,
47 DRSUAPI_DRS_NO_DISCARD
= 0x00100000,
48 DRSUAPI_DRS_NEVER_SYNCED
= 0x00200000,
49 DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING
= 0x00400000,
50 DRSUAPI_DRS_INIT_SYNC_NOW
= 0x00800000,
51 DRSUAPI_DRS_PREEMPTED
= 0x01000000,
52 DRSUAPI_DRS_SYNC_FORCED
= 0x02000000,
53 DRSUAPI_DRS_DISABLE_AUTO_SYNC
= 0x04000000,
54 DRSUAPI_DRS_DISABLE_PERIODIC_SYNC
= 0x08000000,
55 DRSUAPI_DRS_USE_COMPRESSION
= 0x10000000,
56 DRSUAPI_DRS_NEVER_NOTIFY
= 0x20000000,
57 DRSUAPI_DRS_SYNC_PAS
= 0x40000000,
58 DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP
= 0x80000000
63 typedef [bitmap32bit
] bitmap
{
64 DRSUAPI_SUPPORTED_EXTENSION_BASE
= 0x00000001,
65 DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION
= 0x00000002,
66 DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI
= 0x00000004,
67 DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2
= 0x00000008,
68 DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS
= 0x00000010,
69 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1
= 0x00000020,
70 DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION
= 0x00000040,
71 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY
= 0x00000080,
72 DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE
= 0x00000100,
73 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2
= 0x00000200,
74 DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION
= 0x00000400,
75 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2
= 0x00000800,
76 DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD
= 0x00001000,
77 DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND
= 0x00002000,
78 DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO
= 0x00004000,
79 DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION
= 0x00008000,
80 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01
= 0x00010000,
81 DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP
= 0x00020000,
82 DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY
= 0x00040000,
83 DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3
= 0x00080000,
84 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5
= 0x00100000,
85 DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2
= 0x00200000,
86 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6
= 0x00400000,
87 DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS
= 0x00800000,
88 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8
= 0x01000000,
89 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5
= 0x02000000,
90 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6
= 0x04000000,
92 * the following 3 have the same value
93 * repadmin.exe /bind says that
95 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3
= 0x08000000,
96 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7
= 0x08000000,
97 DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT
= 0x08000000,
98 DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS
= 0x10000000,
99 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10
= 0x20000000,
100 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2
= 0x40000000,
101 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3
= 0x80000000
102 } drsuapi_SupportedExtensions
;
104 typedef [bitmap32bit
] bitmap
{
105 DRSUAPI_SUPPORTED_EXTENSION_ADAM
= 0x00000001,
106 DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2
= 0x00000002,
107 DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN
= 0x00000004
108 } drsuapi_SupportedExtensionsExt
;
110 /* this is used by w2k */
112 drsuapi_SupportedExtensions supported_extensions
;
115 } drsuapi_DsBindInfo24
;
117 /* this is used by w2k3 */
119 drsuapi_SupportedExtensions supported_extensions
;
123 } drsuapi_DsBindInfo28
;
125 /* this is used by w2k8 */
127 drsuapi_SupportedExtensions supported_extensions
;
131 drsuapi_SupportedExtensionsExt supported_extensions_ext
;
133 } drsuapi_DsBindInfo48
;
136 [flag
(NDR_REMAINING
)] DATA_BLOB info
;
137 } drsuapi_DsBindInfoFallBack
;
139 typedef [nodiscriminant
] union {
140 [case(24)][subcontext
(4)] drsuapi_DsBindInfo24 info24
;
141 [case(28)][subcontext
(4)] drsuapi_DsBindInfo28 info28
;
142 [case(48)][subcontext
(4)] drsuapi_DsBindInfo48 info48
;
143 [default][subcontext
(4)] drsuapi_DsBindInfoFallBack FallBack
;
144 } drsuapi_DsBindInfo
;
146 /* the drsuapi_DsBindInfoCtr was this before
147 * typedef [flag(NDR_PAHEX)] struct {
148 * [range(1,10000)] uint32 length;
149 * [size_is(length)] uint8 data[];
150 * } drsuapi_DsBindInfo;
152 * but we don't want the caller to manually decode this blob,
153 * so we're doing it here
157 [range(1,10000)] uint32 length
;
158 [switch_is(length
)] drsuapi_DsBindInfo info
;
159 } drsuapi_DsBindInfoCtr
;
161 /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
163 * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
165 const char *DRSUAPI_DS_BIND_GUID
= "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
167 * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
168 * as administrator and this values are also used in the destination_dsa_guid field
169 * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
171 const char *DRSUAPI_DS_BIND_GUID_W2K
= "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
172 const char *DRSUAPI_DS_BIND_GUID_W2K3
= "6afab99c-6e26-464a-975f-f58f105218bc";
174 [public] WERROR drsuapi_DsBind
(
175 [in,unique] GUID
*bind_guid
,
176 [in,out,unique] drsuapi_DsBindInfoCtr
*bind_info
,
177 [out] policy_handle
*bind_handle
182 WERROR drsuapi_DsUnbind
(
183 [in,out] policy_handle
*bind_handle
188 typedef [public,gensize
] struct {
189 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier
(r
, ndr
->iconv_convenience
, ndr
->flags
)-4)] uint32 __ndr_size
;
190 [value
(ndr_size_dom_sid28
(&sid
, ndr
->flags
))] uint32 __ndr_size_sid
;
193 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
194 [charset
(UTF16
),size_is(__ndr_size_dn
+1)] uint16 dn
[];
195 } drsuapi_DsReplicaObjectIdentifier
;
198 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
199 GUID source_dsa_guid
;
200 astring
*source_dsa_dns
; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
201 drsuapi_DrsOptions options
;
202 } drsuapi_DsReplicaSyncRequest1
;
204 typedef [switch_type(uint32
)] union {
205 [case(1)] drsuapi_DsReplicaSyncRequest1 req1
;
206 } drsuapi_DsReplicaSyncRequest
;
208 WERROR drsuapi_DsReplicaSync
(
209 [in] policy_handle
*bind_handle
,
211 [in,switch_is(level
)] drsuapi_DsReplicaSyncRequest
*req
216 typedef [public] struct {
217 hyper tmp_highest_usn
; /* updated after each object update */
219 hyper highest_usn
; /* updated after a full replication cycle */
220 } drsuapi_DsReplicaHighWaterMark
;
222 typedef [public] struct {
223 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
224 hyper highest_usn
; /* updated after a full replication cycle */
225 } drsuapi_DsReplicaCursor
;
228 [value
(1)] uint32
version;
229 [value
(0)] uint32 reserved1
;
230 [range(0,0x100000)] uint32 count
;
231 [value
(0)] uint32 reserved2
;
232 [size_is(count
)] drsuapi_DsReplicaCursor cursors
[];
233 } drsuapi_DsReplicaCursorCtrEx
;
235 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
236 DRSUAPI_EXOP_NONE
= 0x00000000,
237 DRSUAPI_EXOP_FSMO_REQ_ROLE
= 0x00000001,
238 DRSUAPI_EXOP_FSMO_RID_ALLOC
= 0x00000002,
239 DRSUAPI_EXOP_FSMO_RID_REQ_ROLE
= 0x00000003,
240 DRSUAPI_EXOP_FSMO_REQ_PDC
= 0x00000004,
241 DRSUAPI_EXOP_FSMO_ABANDON_ROLE
= 0x00000005,
242 DRSUAPI_EXOP_REPL_OBJ
= 0x00000006,
243 DRSUAPI_EXOP_REPL_SECRET
= 0x00000007
244 } drsuapi_DsExtendedOperation
;
246 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
247 DRSUAPI_EXOP_ERR_NONE
= 0x00000000,
248 DRSUAPI_EXOP_ERR_SUCCESS
= 0x00000001,
249 DRSUAPI_EXOP_ERR_UNKNOWN_OP
= 0x00000002,
250 DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER
= 0x00000003,
251 DRSUAPI_EXOP_ERR_UPDATE_ERR
= 0x00000004,
252 DRSUAPI_EXOP_ERR_EXCEPTION
= 0x00000005,
253 DRSUAPI_EXOP_ERR_UNKNOWN_CALLER
= 0x00000006,
254 DRSUAPI_EXOP_ERR_RID_ALLOC
= 0x00000007,
255 DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED
= 0x00000008,
256 DRSUAPI_EXOP_ERR_FMSO_PENDING_OP
= 0x00000009,
257 DRSUAPI_EXOP_ERR_MISMATCH
= 0x0000000A,
258 DRSUAPI_EXOP_ERR_COULDNT_CONTACT
= 0x0000000B,
259 DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES
= 0x0000000C,
260 DRSUAPI_EXOP_ERR_DIR_ERROR
= 0x0000000D,
261 DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS
= 0x0000000E,
262 DRSUAPI_EXOP_ERR_ACCESS_DENIED
= 0x0000000F,
263 DRSUAPI_EXOP_ERR_PARAM_ERROR
= 0x00000010
264 } drsuapi_DsExtendedError
;
267 GUID destination_dsa_guid
;
268 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
269 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
270 drsuapi_DsReplicaHighWaterMark highwatermark
;
271 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
272 drsuapi_DrsOptions replica_flags
;
273 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
274 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
275 drsuapi_DsExtendedOperation extended_op
;
277 } drsuapi_DsGetNCChangesRequest5
;
280 * In DRSUAPI all attributes with syntax 2.5.5.2
281 * are identified by uint32 values
283 * the following table shows the mapping used between the two representations
284 * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
285 * and a UINT32-ID of '0x0017002F'.
286 * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
287 * OID-prefix: 1.2.840.113556.1.5.7000
288 * and a value: 47 => 0x2F
289 * - the mapping table gives a UINT32-prefix: 0x00170000
290 * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
292 * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
293 * array. The following are the default mappings of w2k3
295 * OID-prefix => UINT32-Id prefix
297 * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
298 * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
299 * 1.2.840.113556.1.2.* => 0x00020000
300 * 1.2.840.113556.1.3.* => 0x00030000
301 * 2.5.5.* => 0x00080000 (attributeSyntax OID's)
302 * 1.2.840.113556.1.4.* => 0x00090000
303 * 1.2.840.113556.1.5.* => 0x000A0000
304 * 2.16.840.1.113730.3.* => 0x00140000
305 * 0.9.2342.19200300.100.1.* => 0x00150000
306 * 2.16.840.1.113730.3.1.* => 0x00160000
307 * 1.2.840.113556.1.5.7000.* => 0x00170000
308 * 2.5.21.* => 0x00180000 (attrs for SubSchema)
309 * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
310 * 2.5.20.* => 0x001A0000
311 * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
312 * 2.16.840.1.113730.3.2.* => 0x001C0000
313 * 1.3.6.1.4.1.250.1.* => 0x001D0000
314 * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
315 * 0.9.2342.19200300.100.4.* => 0x001F0000
317 * Here's a list of used 'attributeSyntax' OID's
319 * 2.5.5.1 => Object(DS-DN) string
320 * struct drsuapi_DsObjectIdentifier3
322 * 2.5.5.2 => OID-string
323 * => all values are represented as uint32 values in drsuapi
324 * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
325 * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
326 * are returned as attribute names
328 * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
330 * 2.5.5.5 => String(IA5) case-sensitive string
332 * 2.5.5.6 => String(Numeric)
333 * => eg. internationalISDNNumber
335 * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
336 * => e.g. wellKnownObjects
342 * 2.5.5.10 => DATA_BLOB
345 * 2.5.5.11 => LDAP timestring
348 * 2.5.5.12 => String(Unicode) case-insensitive string
349 * => 'standard strings'
351 * 2.5.5.13 => Object(Presentation-Address) string
352 * => used in objectClass applicationEntity
354 * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
357 * 2.5.5.15 => ntSecurityDescriptor
361 * 2.5.5.17 => dom_sid
363 typedef [noprint
] struct {
364 [range(0,10000)] uint32 length
;
365 [size_is(length
)] uint8
*binary_oid
; /* partial-binary-OID encoded with asn1_write_partial_OID_String() */
366 } drsuapi_DsReplicaOID
;
370 drsuapi_DsReplicaOID oid
;
371 } drsuapi_DsReplicaOIDMapping
;
373 typedef [public] struct {
374 [range(0,0x100000)] uint32 num_mappings
;
375 [size_is(num_mappings
)] drsuapi_DsReplicaOIDMapping
*mappings
;
376 } drsuapi_DsReplicaOIDMapping_Ctr
;
378 typedef [flag
(NDR_PAHEX
),v1_enum] enum {
379 DRSUAPI_OBJECTCLASS_top
= 0x00010000,
380 DRSUAPI_OBJECTCLASS_classSchema
= 0x0003000d,
381 DRSUAPI_OBJECTCLASS_attributeSchema
= 0x0003000e
382 } drsuapi_DsObjectClassId
;
384 typedef [flag
(NDR_PAHEX
),v1_enum,public] enum {
385 DRSUAPI_ATTRIBUTE_objectClass
= 0x00000000,
386 DRSUAPI_ATTRIBUTE_cn
= 0x00000003,
387 DRSUAPI_ATTRIBUTE_description
= 0x0000000d,
388 DRSUAPI_ATTRIBUTE_member
= 0x0000001f,
389 DRSUAPI_ATTRIBUTE_instanceType
= 0x00020001,
390 DRSUAPI_ATTRIBUTE_whenCreated
= 0x00020002,
391 DRSUAPI_ATTRIBUTE_possSuperiors
= 0x00020008,
392 DRSUAPI_ATTRIBUTE_hasMasterNCs
= 0x0002000e,
393 DRSUAPI_ATTRIBUTE_subClassOf
= 0x00020015,
394 DRSUAPI_ATTRIBUTE_governsID
= 0x00020016,
395 DRSUAPI_ATTRIBUTE_mustContain
= 0x00020018,
396 DRSUAPI_ATTRIBUTE_mayContain
= 0x00020019,
397 DRSUAPI_ATTRIBUTE_rDNAttId
= 0x0002001A,
398 DRSUAPI_ATTRIBUTE_attributeID
= 0x0002001e,
399 DRSUAPI_ATTRIBUTE_attributeSyntax
= 0x00020020,
400 DRSUAPI_ATTRIBUTE_isSingleValued
= 0x00020021,
401 DRSUAPI_ATTRIBUTE_rangeLower
= 0x00020022,
402 DRSUAPI_ATTRIBUTE_rangeUpper
= 0x00020023,
403 DRSUAPI_ATTRIBUTE_dMDLocation
= 0x00020024,
404 DRSUAPI_ATTRIBUTE_objectVersion
= 0x0002004c,
405 DRSUAPI_ATTRIBUTE_invocationId
= 0x00020073,
406 DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly
= 0x000200a9,
407 DRSUAPI_ATTRIBUTE_adminDisplayName
= 0x000200c2,
408 DRSUAPI_ATTRIBUTE_adminDescription
= 0x000200e2,
409 DRSUAPI_ATTRIBUTE_oMSyntax
= 0x000200e7,
410 DRSUAPI_ATTRIBUTE_ntSecurityDescriptor
= 0x00020119,
411 DRSUAPI_ATTRIBUTE_searchFlags
= 0x0002014e,
412 DRSUAPI_ATTRIBUTE_auxiliaryClass
= 0x0002015f,
413 DRSUAPI_ATTRIBUTE_lDAPDisplayName
= 0x000201cc,
414 DRSUAPI_ATTRIBUTE_name
= 0x00090001,
415 DRSUAPI_ATTRIBUTE_userAccountControl
= 0x00090008,
416 DRSUAPI_ATTRIBUTE_currentValue
= 0x0009001b,
417 DRSUAPI_ATTRIBUTE_homeDirectory
= 0x0009002c,
418 DRSUAPI_ATTRIBUTE_homeDrive
= 0x0009002d,
419 DRSUAPI_ATTRIBUTE_scriptPath
= 0x0009003e,
420 DRSUAPI_ATTRIBUTE_profilePath
= 0x0009008b,
421 DRSUAPI_ATTRIBUTE_objectSid
= 0x00090092,
422 DRSUAPI_ATTRIBUTE_schemaIDGUID
= 0x00090094,
423 DRSUAPI_ATTRIBUTE_dBCSPwd
= 0x00090037,/* lmPwdHash */
424 DRSUAPI_ATTRIBUTE_logonHours
= 0x00090040,
425 DRSUAPI_ATTRIBUTE_userWorkstations
= 0x00090056,
426 DRSUAPI_ATTRIBUTE_unicodePwd
= 0x0009005a,/* ntPwdHash */
427 DRSUAPI_ATTRIBUTE_ntPwdHistory
= 0x0009005e,
428 DRSUAPI_ATTRIBUTE_priorValue
= 0x00090064,
429 DRSUAPI_ATTRIBUTE_supplementalCredentials
= 0x0009007d,
430 DRSUAPI_ATTRIBUTE_trustAuthIncoming
= 0x00090081,
431 DRSUAPI_ATTRIBUTE_trustAuthOutgoing
= 0x00090087,
432 DRSUAPI_ATTRIBUTE_lmPwdHistory
= 0x000900a0,
433 DRSUAPI_ATTRIBUTE_systemPossSuperiors
= 0x000900c3,
434 DRSUAPI_ATTRIBUTE_systemMayContain
= 0x000900c4,
435 DRSUAPI_ATTRIBUTE_systemMustContain
= 0x000900c5,
436 DRSUAPI_ATTRIBUTE_systemAuxiliaryClass
= 0x000900c6,
437 DRSUAPI_ATTRIBUTE_sAMAccountName
= 0x000900dd,
438 DRSUAPI_ATTRIBUTE_sAMAccountType
= 0x0009012e,
439 DRSUAPI_ATTRIBUTE_options
= 0x00090133,
440 DRSUAPI_ATTRIBUTE_fSMORoleOwner
= 0x00090171,
441 DRSUAPI_ATTRIBUTE_systemFlags
= 0x00090177,
442 DRSUAPI_ATTRIBUTE_serverReference
= 0x00090203,
443 DRSUAPI_ATTRIBUTE_serverReferenceBL
= 0x00090204,
444 DRSUAPI_ATTRIBUTE_initialAuthIncoming
= 0x0009021b,
445 DRSUAPI_ATTRIBUTE_initialAuthOutgoing
= 0x0009021c,
446 DRSUAPI_ATTRIBUTE_wellKnownObjects
= 0x0009026a,
447 DRSUAPI_ATTRIBUTE_dNSHostName
= 0x0009026b,
448 DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet
= 0x0009027f,
449 DRSUAPI_ATTRIBUTE_userPrincipalName
= 0x00090290,
450 DRSUAPI_ATTRIBUTE_groupType
= 0x000902ee,
451 DRSUAPI_ATTRIBUTE_servicePrincipalName
= 0x00090303,
452 DRSUAPI_ATTRIBUTE_objectCategory
= 0x0009030e,
453 DRSUAPI_ATTRIBUTE_gPLink
= 0x0009037b,
454 DRSUAPI_ATTRIBUTE_transportAddressAttribute
= 0x0009037f,
455 DRSUAPI_ATTRIBUTE_msDS_Behavior_Version
= 0x000905b3,
456 DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber
= 0x000906f6,
457 DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs
= 0x0009071c,
458 DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs
= 0x0009072c,
459 DRSUAPI_ATTRIBUTE_NONE
= 0xFFFFFFFF
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_DrsOptions 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
;
486 GUID destination_dsa_guid
;
487 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
488 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
489 drsuapi_DsReplicaHighWaterMark highwatermark
;
490 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
491 drsuapi_DrsOptions replica_flags
;
492 uint32 max_object_count
; /* w2k3 uses min(133,max(100,max_object_count)) */
493 uint32 max_ndr_size
; /* w2k3 seems to ignore this */
494 drsuapi_DsExtendedOperation extended_op
;
496 drsuapi_DsPartialAttributeSet
*partial_attribute_set
;
497 drsuapi_DsPartialAttributeSet
*partial_attribute_set_ex
;
498 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
500 } drsuapi_DsGetNCChangesRequest10
;
502 typedef [switch_type(uint32
)] union {
503 [case(5)] drsuapi_DsGetNCChangesRequest5 req5
;
504 [case(8)] drsuapi_DsGetNCChangesRequest8 req8
;
505 [case(10)] drsuapi_DsGetNCChangesRequest10 req10
;
506 } drsuapi_DsGetNCChangesRequest
;
508 typedef [public] struct {
509 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
510 hyper highest_usn
; /* updated after a full replication cycle */
511 NTTIME last_sync_success
;
512 } drsuapi_DsReplicaCursor2
;
515 [value
(2)] uint32
version;
516 [value
(0)] uint32 reserved1
;
517 [range(0,0x100000)] uint32 count
;
518 [value
(0)] uint32 reserved2
;
519 [size_is(count
)] drsuapi_DsReplicaCursor2 cursors
[];
520 } drsuapi_DsReplicaCursor2CtrEx
;
522 /* Generic DATA_BLOB values */
524 [range(0,10485760),value
(ndr_size_DATA_BLOB
(0,blob
,0))] uint32 __ndr_size
;
526 } drsuapi_DsAttributeValue
;
529 [range(0,10485760)] uint32 num_values
;
530 [size_is(num_values
)] drsuapi_DsAttributeValue
*values
;
531 } drsuapi_DsAttributeValueCtr
;
533 /* DN String values */
534 typedef [public,gensize
] struct {
535 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3
(r
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 __ndr_size
;
536 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
539 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
540 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
541 } drsuapi_DsReplicaObjectIdentifier3
;
543 typedef [public] struct {
544 [value
(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary
(r
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 __ndr_size
;
545 [value
(ndr_size_dom_sid28
(&sid
,ndr
->flags
))] uint32 __ndr_size_sid
;
548 [value
(strlen_m
(dn
))] uint32 __ndr_size_dn
;
549 [charset
(UTF16
)] uint16 dn
[__ndr_size_dn
+1];
550 [value
(binary.length
+ 4)] uint32 __ndr_size_binary
;
551 [flag
(NDR_REMAINING
)] DATA_BLOB binary
;
552 } drsuapi_DsReplicaObjectIdentifier3Binary
;
554 typedef [public] struct {
555 drsuapi_DsAttributeId attid
;
556 drsuapi_DsAttributeValueCtr value_ctr
;
557 } drsuapi_DsReplicaAttribute
;
560 [range(0,1048576)] uint32 num_attributes
;
561 [size_is(num_attributes
)] drsuapi_DsReplicaAttribute
*attributes
;
562 } drsuapi_DsReplicaAttributeCtr
;
564 typedef [public] bitmap
{
565 DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER
= 0x00000001,
566 DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC
= 0x00000002,
567 DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY
= 0x00010000
568 } drsuapi_DsReplicaObjectFlags
;
570 typedef [public] struct {
571 drsuapi_DsReplicaObjectIdentifier
*identifier
;
572 drsuapi_DsReplicaObjectFlags flags
;
573 drsuapi_DsReplicaAttributeCtr attribute_ctr
;
574 } drsuapi_DsReplicaObject
;
578 NTTIME_1sec originating_change_time
;
579 GUID originating_invocation_id
;
580 hyper originating_usn
;
581 } drsuapi_DsReplicaMetaData
;
583 typedef [public] struct {
584 [range(0,1048576)] uint32 count
;
585 [size_is(count
)] drsuapi_DsReplicaMetaData meta_data
[];
586 } drsuapi_DsReplicaMetaDataCtr
;
588 typedef [public,noprint
] struct {
589 drsuapi_DsReplicaObjectListItemEx
*next_object
;
590 drsuapi_DsReplicaObject
object;
591 boolean32 is_nc_prefix
;
592 GUID
*parent_object_guid
;
593 drsuapi_DsReplicaMetaDataCtr
*meta_data_ctr
;
594 } drsuapi_DsReplicaObjectListItemEx
;
596 typedef [public,gensize
] struct {
597 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
598 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
599 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
600 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
601 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
602 drsuapi_DsReplicaCursorCtrEx
*uptodateness_vector
;
603 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
604 drsuapi_DsExtendedError extended_ret
; /* w2k sends the nc_object_count value here */
606 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
607 [value
(ndr_size_drsuapi_DsGetNCChangesCtr1
(r
,ndr
->iconv_convenience
,ndr
->flags
)+55)] uint32 __ndr_size
;
608 drsuapi_DsReplicaObjectListItemEx
*first_object
;
610 } drsuapi_DsGetNCChangesCtr1
;
613 * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
614 * isn't there it means the value is deleted
616 typedef [public] bitmap
{
617 DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE
= 0x00000001
618 } drsuapi_DsLinkedAttributeFlags
;
620 typedef [public] struct {
621 drsuapi_DsReplicaObjectIdentifier
*identifier
;
622 drsuapi_DsAttributeId attid
;
623 drsuapi_DsAttributeValue value
;
624 drsuapi_DsLinkedAttributeFlags flags
;
625 NTTIME_1sec originating_add_time
;
626 drsuapi_DsReplicaMetaData meta_data
;
627 } drsuapi_DsReplicaLinkedAttribute
;
629 /* [MS-DRSR] section 4.1.10.2.11 DRS_MSG_GETCHGREPLY_V6 */
630 typedef [public,gensize
] struct {
631 GUID source_dsa_guid
; /* the 'objectGUID' field of the CN=NTDS Settings object */
632 GUID source_dsa_invocation_id
; /* the 'invocationId' field of the CN=NTDS Settings object */
633 drsuapi_DsReplicaObjectIdentifier
*naming_context
;
634 drsuapi_DsReplicaHighWaterMark old_highwatermark
;
635 drsuapi_DsReplicaHighWaterMark new_highwatermark
;
636 drsuapi_DsReplicaCursor2CtrEx
*uptodateness_vector
;
637 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr
;
638 drsuapi_DsExtendedError extended_ret
;
640 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
641 [value
(ndr_size_drsuapi_DsGetNCChangesCtr6
(r
,ndr
->iconv_convenience
,ndr
->flags
)+55)] uint32 __ndr_size
;
642 drsuapi_DsReplicaObjectListItemEx
*first_object
;
644 uint32 nc_object_count
; /* estimated amount of objects in the whole NC */
645 uint32 nc_linked_attributes_count
; /* estimated amount of linked values in the whole NC */
646 [range(0,1048576)] uint32 linked_attributes_count
;
647 [size_is(linked_attributes_count
)] drsuapi_DsReplicaLinkedAttribute
*linked_attributes
;
649 } drsuapi_DsGetNCChangesCtr6
;
651 typedef [public] struct {
652 [subcontext
(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1
;
653 } drsuapi_DsGetNCChangesCtr1TS
;
655 typedef [public] struct {
656 [subcontext
(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6
;
657 } drsuapi_DsGetNCChangesCtr6TS
;
659 typedef [nopush
] struct {
660 uint32 decompressed_length
;
661 uint32 compressed_length
;
662 [subcontext
(4),subcontext_size
(compressed_length
),
663 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
664 drsuapi_DsGetNCChangesCtr1TS
*ts
;
665 } drsuapi_DsGetNCChangesMSZIPCtr1
;
667 typedef [nopush
] struct {
668 uint32 decompressed_length
;
669 uint32 compressed_length
;
670 [subcontext
(4),subcontext_size
(compressed_length
),
671 compression
(NDR_COMPRESSION_MSZIP
,compressed_length
,decompressed_length
)]
672 drsuapi_DsGetNCChangesCtr6TS
*ts
;
673 } drsuapi_DsGetNCChangesMSZIPCtr6
;
675 typedef [nopush
] struct {
676 uint32 decompressed_length
;
677 uint32 compressed_length
;
678 [subcontext
(4),subcontext_size
(compressed_length
),
679 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
680 drsuapi_DsGetNCChangesCtr1TS
*ts
;
681 } drsuapi_DsGetNCChangesXPRESSCtr1
;
683 typedef [nopush
] struct {
684 uint32 decompressed_length
;
685 uint32 compressed_length
;
686 [subcontext
(4),subcontext_size
(compressed_length
),
687 compression
(NDR_COMPRESSION_XPRESS
,compressed_length
,decompressed_length
)]
688 drsuapi_DsGetNCChangesCtr6TS
*ts
;
689 } drsuapi_DsGetNCChangesXPRESSCtr6
;
691 typedef [enum16bit
] enum {
692 DRSUAPI_COMPRESSION_TYPE_MSZIP
= 2,
693 DRSUAPI_COMPRESSION_TYPE_XPRESS
= 3
694 } drsuapi_DsGetNCChangesCompressionType
;
696 typedef [nodiscriminant
,flag
(NDR_PAHEX
)] union {
697 [case(1|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1
;
698 [case(6|
(DRSUAPI_COMPRESSION_TYPE_MSZIP
<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6
;
699 [case(1|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1
;
700 [case(6|
(DRSUAPI_COMPRESSION_TYPE_XPRESS
<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6
;
701 } drsuapi_DsGetNCChangesCompressedCtr
;
704 drsuapi_DsGetNCChangesMSZIPCtr1 mszip1
;
705 } drsuapi_DsGetNCChangesCtr2
;
708 [range(0,6)] uint32 level
;
709 [range(2,3)] drsuapi_DsGetNCChangesCompressionType type
;
710 [switch_is(level |
(type
<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr
;
711 } drsuapi_DsGetNCChangesCtr7
;
713 typedef [switch_type(uint32
)] union {
714 [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1
;
715 [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2
;
716 [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6
;
717 [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7
;
718 } drsuapi_DsGetNCChangesCtr
;
720 WERROR drsuapi_DsGetNCChanges
(
721 [in] policy_handle
*bind_handle
,
723 [in,ref,switch_is(level
)] drsuapi_DsGetNCChangesRequest
*req
,
724 [out,ref] uint32
*level_out
,
725 [out,ref,switch_is(*level_out
)] drsuapi_DsGetNCChangesCtr
*ctr
730 /* [MS-DRSR] 4.1.26 */
733 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
734 [ref,charset
(DOS
),string] uint8
*dest_dsa_dns_name
;
736 drsuapi_DrsOptions options
;
737 } drsuapi_DsReplicaUpdateRefsRequest1
;
739 typedef [switch_type(uint32
)] union {
740 [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1
;
741 } drsuapi_DsReplicaUpdateRefsRequest
;
743 WERROR drsuapi_DsReplicaUpdateRefs
(
744 [in] policy_handle
*bind_handle
,
746 [in,switch_is(level
)] drsuapi_DsReplicaUpdateRefsRequest req
753 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
754 [charset
(UTF16
),string] uint16
*source_dsa_address
;
756 drsuapi_DrsOptions options
;
757 } drsuapi_DsReplicaAddRequest1
;
760 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
761 drsuapi_DsReplicaObjectIdentifier
*source_dsa_dn
;
762 drsuapi_DsReplicaObjectIdentifier
*transport_dn
;
763 [charset
(UTF16
),string] uint16
*source_dsa_address
;
765 drsuapi_DrsOptions options
;
766 } drsuapi_DsReplicaAddRequest2
;
768 typedef [switch_type(uint32
)] union {
769 [case(1)] drsuapi_DsReplicaAddRequest1 req1
;
770 [case(2)] drsuapi_DsReplicaAddRequest2 req2
;
771 } drsuapi_DsReplicaAddRequest
;
773 WERROR drsuapi_DsReplicaAdd
(
774 [in] policy_handle
*bind_handle
,
776 [in,switch_is(level
)] drsuapi_DsReplicaAddRequest req
783 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
784 [charset
(UTF16
),string] uint16
*source_dsa_address
;
785 drsuapi_DrsOptions options
;
786 } drsuapi_DsReplicaDelRequest1
;
788 typedef [switch_type(uint32
)] union {
789 [case(1)] drsuapi_DsReplicaDelRequest1 req1
;
790 } drsuapi_DsReplicaDelRequest
;
792 WERROR drsuapi_DsReplicaDel
(
793 [in] policy_handle
*bind_handle
,
795 [in,switch_is(level
)] drsuapi_DsReplicaDelRequest req
802 [ref] drsuapi_DsReplicaObjectIdentifier
*naming_context
;
804 [charset
(UTF16
),string] uint16
*source_dra_address
;
806 uint32 replica_flags
;
807 uint32 modify_fields
;
808 drsuapi_DrsOptions options
;
809 } drsuapi_DsReplicaModRequest1
;
811 typedef [switch_type(uint32
)] union {
812 [case(1)] drsuapi_DsReplicaModRequest1 req1
;
813 } drsuapi_DsReplicaModRequest
;
815 WERROR drsuapi_DsReplicaMod
(
816 [in] policy_handle
*bind_handle
,
818 [in,switch_is(level
)] drsuapi_DsReplicaModRequest req
823 [todo
] WERROR DRSUAPI_VERIFY_NAMES
();
828 /* how are type 4 and 7 different from 2 and 3 ? */
829 typedef [v1_enum] enum {
830 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS
= 1,
831 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS
= 2,
832 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS
= 3,
833 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2
= 4,
834 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS
= 5,
835 DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS
= 6,
836 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2
= 7
837 } drsuapi_DsMembershipType
;
841 [range(0,10000)] uint32 num_memberships
;
842 [range(0,10000)] uint32 num_sids
;
843 [size_is(num_memberships
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
844 [size_is(num_memberships
)] samr_GroupAttrs
*group_attrs
;
845 [size_is(num_sids
)] dom_sid28
**sids
;
846 } drsuapi_DsGetMembershipsCtr1
;
848 typedef [switch_type(int32
)] union {
849 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
850 } drsuapi_DsGetMembershipsCtr
;
852 const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR
= 0x1;
855 [range(1,10000)] uint32 count
;
856 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier
**info_array
;
858 drsuapi_DsMembershipType type
;
859 drsuapi_DsReplicaObjectIdentifier
*domain
;
860 } drsuapi_DsGetMembershipsRequest1
;
862 typedef [switch_type(int32
)] union {
863 [case(1)] drsuapi_DsGetMembershipsRequest1 req1
;
864 } drsuapi_DsGetMembershipsRequest
;
866 [todo
] WERROR drsuapi_DsGetMemberships
(
867 [in] policy_handle
*bind_handle
,
869 [in,ref] [switch_is(level
)] drsuapi_DsGetMembershipsRequest
*req
,
870 [out,ref] int32
*level_out
,
871 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMembershipsCtr
*ctr
876 [todo
] WERROR DRSUAPI_INTER_DOMAIN_MOVE
();
883 [range(0,0x00A00000)] uint32 length
;
884 [size_is(length
)] uint8
*data
;
885 } drsuapi_DsGetNT4ChangeLogRequest1
;
887 typedef [switch_type(uint32
)] union {
888 [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1
;
889 } drsuapi_DsGetNT4ChangeLogRequest
;
892 [range(0,0x00A00000)] uint32 length1
;
893 [range(0,0x00A00000)] uint32 length2
;
901 [size_is(length1
)] uint8
*data1
;
902 [size_is(length2
)] uint8
*data2
;
903 } drsuapi_DsGetNT4ChangeLogInfo1
;
905 typedef [switch_type(uint32
)] union {
906 [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1
;
907 } drsuapi_DsGetNT4ChangeLogInfo
;
909 [todo
] WERROR drsuapi_DsGetNT4ChangeLog
(
910 [in] policy_handle
*bind_handle
,
912 [in,ref] [switch_is(level
)] drsuapi_DsGetNT4ChangeLogRequest
*req
,
913 [out,ref] uint32
*level_out
,
914 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetNT4ChangeLogInfo
*info
919 typedef [v1_enum] enum {
920 DRSUAPI_DS_NAME_STATUS_OK
= 0,
921 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR
= 1,
922 DRSUAPI_DS_NAME_STATUS_NOT_FOUND
= 2,
923 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE
= 3,
924 DRSUAPI_DS_NAME_STATUS_NO_MAPPING
= 4,
925 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY
= 5,
926 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING
= 6,
927 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL
= 7
928 } drsuapi_DsNameStatus
;
930 typedef [v1_enum] enum {
931 DRSUAPI_DS_NAME_FLAG_NO_FLAGS
= 0x0,
932 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY
= 0x1,
933 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC
= 0x2,
934 DRSUAPI_DS_NAME_FLAG_GCVERIFY
= 0x4,
935 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL
= 0x8
936 } drsuapi_DsNameFlags
;
938 typedef [v1_enum] enum {
939 DRSUAPI_DS_NAME_FORMAT_UNKNOWN
= 0,
940 DRSUAPI_DS_NAME_FORMAT_FQDN_1779
= 1,
941 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT
= 2,
942 DRSUAPI_DS_NAME_FORMAT_DISPLAY
= 3,
943 DRSUAPI_DS_NAME_FORMAT_GUID
= 6,
944 DRSUAPI_DS_NAME_FORMAT_CANONICAL
= 7,
945 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL
= 8,
946 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX
= 9,
947 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL
= 10,
948 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY
= 11,
949 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN
= 12
950 } drsuapi_DsNameFormat
;
953 [string,charset
(UTF16
)] uint16
*str
;
954 } drsuapi_DsNameString
;
957 uint32 codepage
; /* 0x000004e4 - 1252 is german codepage*/
958 uint32 language
; /* 0x00000407 - german language ID*/
959 drsuapi_DsNameFlags format_flags
;
960 drsuapi_DsNameFormat format_offered
;
961 drsuapi_DsNameFormat format_desired
;
962 [range(1,10000)] uint32 count
;
963 [size_is(count
)] drsuapi_DsNameString
*names
;
964 } drsuapi_DsNameRequest1
;
966 typedef [switch_type(int32
)] union {
967 [case(1)] drsuapi_DsNameRequest1 req1
;
968 } drsuapi_DsNameRequest
;
971 drsuapi_DsNameStatus status
;
972 [charset
(UTF16
),string] uint16
*dns_domain_name
;
973 [charset
(UTF16
),string] uint16
*result_name
;
974 } drsuapi_DsNameInfo1
;
978 [size_is(count
)] drsuapi_DsNameInfo1
*array
;
979 } drsuapi_DsNameCtr1
;
981 typedef [switch_type(int32
)] union {
982 [case(1)] drsuapi_DsNameCtr1
*ctr1
;
985 WERROR drsuapi_DsCrackNames
(
986 [in] policy_handle
*bind_handle
,
988 [in,ref,switch_is(level
)] drsuapi_DsNameRequest
*req
,
989 [out,ref] int32
*level_out
,
990 [out,ref,switch_is(*level_out
)] drsuapi_DsNameCtr
*ctr
995 typedef [v1_enum] enum {
996 DRSUAPI_DS_SPN_OPERATION_ADD
= 0,
997 DRSUAPI_DS_SPN_OPERATION_REPLACE
= 1,
998 DRSUAPI_DS_SPN_OPERATION_DELETE
= 2
999 } drsuapi_DsSpnOperation
;
1002 drsuapi_DsSpnOperation operation
;
1004 [charset
(UTF16
),string] uint16
*object_dn
;
1005 [range(0,10000)] uint32 count
;
1006 [size_is(count
)] drsuapi_DsNameString
*spn_names
;
1007 } drsuapi_DsWriteAccountSpnRequest1
;
1009 typedef [switch_type(int32
)] union {
1010 [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1
;
1011 } drsuapi_DsWriteAccountSpnRequest
;
1015 } drsuapi_DsWriteAccountSpnResult1
;
1017 typedef [switch_type(int32
)] union {
1018 [case(1)] drsuapi_DsWriteAccountSpnResult1 res1
;
1019 } drsuapi_DsWriteAccountSpnResult
;
1021 WERROR drsuapi_DsWriteAccountSpn
(
1022 [in] policy_handle
*bind_handle
,
1024 [in,ref,switch_is(level
)] drsuapi_DsWriteAccountSpnRequest
*req
,
1025 [out,ref] int32
*level_out
,
1026 [out,ref,switch_is(*level_out
)] drsuapi_DsWriteAccountSpnResult
*res
1032 [charset
(UTF16
),string] uint16
*server_dn
;
1033 [charset
(UTF16
),string] uint16
*domain_dn
;
1035 } drsuapi_DsRemoveDSServerRequest1
;
1037 typedef [switch_type(int32
)] union {
1038 [case(1)] drsuapi_DsRemoveDSServerRequest1 req1
;
1039 } drsuapi_DsRemoveDSServerRequest
;
1042 boolean32 last_dc_in_domain
;
1043 } drsuapi_DsRemoveDSServerResult1
;
1045 typedef [switch_type(int32
)] union {
1046 [case(1)] drsuapi_DsRemoveDSServerResult1 res1
;
1047 } drsuapi_DsRemoveDSServerResult
;
1049 WERROR drsuapi_DsRemoveDSServer
(
1050 [in] policy_handle
*bind_handle
,
1052 [in,ref,switch_is(level
)] drsuapi_DsRemoveDSServerRequest
*req
,
1053 [out,ref] int32
*level_out
,
1054 [out,ref,switch_is(*level_out
)] drsuapi_DsRemoveDSServerResult
*res
1059 [todo
] WERROR DRSUAPI_REMOVE_DS_DOMAIN
();
1064 [charset
(UTF16
),string] uint16
*domain_name
; /* netbios or dns */
1065 int32 level
; /* specifies the switch level for the request */
1066 } drsuapi_DsGetDCInfoRequest1
;
1068 typedef [switch_type(int32
)] union {
1069 [case(1)] drsuapi_DsGetDCInfoRequest1 req1
;
1070 } drsuapi_DsGetDCInfoRequest
;
1073 [charset
(UTF16
),string] uint16
*netbios_name
;
1074 [charset
(UTF16
),string] uint16
*dns_name
;
1075 [charset
(UTF16
),string] uint16
*site_name
;
1076 [charset
(UTF16
),string] uint16
*computer_dn
;
1077 [charset
(UTF16
),string] uint16
*server_dn
;
1080 } drsuapi_DsGetDCInfo1
;
1083 [range(0,10000)] uint32 count
;
1084 [size_is(count
)] drsuapi_DsGetDCInfo1
*array
;
1085 } drsuapi_DsGetDCInfoCtr1
;
1088 [charset
(UTF16
),string] uint16
*netbios_name
;
1089 [charset
(UTF16
),string] uint16
*dns_name
;
1090 [charset
(UTF16
),string] uint16
*site_name
;
1091 [charset
(UTF16
),string] uint16
*site_dn
;
1092 [charset
(UTF16
),string] uint16
*computer_dn
;
1093 [charset
(UTF16
),string] uint16
*server_dn
;
1094 [charset
(UTF16
),string] uint16
*ntds_dn
;
1102 } drsuapi_DsGetDCInfo2
;
1105 [range(0,10000)] uint32 count
;
1106 [size_is(count
)] drsuapi_DsGetDCInfo2
*array
;
1107 } drsuapi_DsGetDCInfoCtr2
;
1110 [charset
(UTF16
),string] uint16
*netbios_name
;
1111 [charset
(UTF16
),string] uint16
*dns_name
;
1112 [charset
(UTF16
),string] uint16
*site_name
;
1113 [charset
(UTF16
),string] uint16
*site_dn
;
1114 [charset
(UTF16
),string] uint16
*computer_dn
;
1115 [charset
(UTF16
),string] uint16
*server_dn
;
1116 [charset
(UTF16
),string] uint16
*ntds_dn
;
1125 } drsuapi_DsGetDCInfo3
;
1128 [range(0,10000)] uint32 count
;
1129 [size_is(count
)] drsuapi_DsGetDCInfo3
*array
;
1130 } drsuapi_DsGetDCInfoCtr3
;
1133 * this represents an active connection to the
1134 * Directory System Agent (DSA)
1135 * this can be via LDAP or DRSUAPI
1138 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1140 uint32 connection_time
; /* in seconds */
1145 * client_account can be the following:
1146 * "W2K3\Administrator"
1147 * "Administrator@W2K3"
1148 * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
1152 [charset
(UTF16
),string] uint16
*client_account
;
1153 } drsuapi_DsGetDCConnection01
;
1156 [range(0,10000)] uint32 count
;
1157 [size_is(count
)] drsuapi_DsGetDCConnection01
*array
;
1158 } drsuapi_DsGetDCConnectionCtr01
;
1160 typedef [v1_enum] enum {
1161 DRSUAPI_DC_INFO_CTR_1
= 1,
1162 DRSUAPI_DC_INFO_CTR_2
= 2,
1163 DRSUAPI_DC_INFO_CTR_3
= 3,
1164 DRSUAPI_DC_CONNECTION_CTR_01
= -1
1165 } drsuapi_DsGetDCInfoCtrLevels
;
1167 typedef [switch_type(int32
)] union {
1168 [case(DRSUAPI_DC_INFO_CTR_1
)] drsuapi_DsGetDCInfoCtr1 ctr1
;
1169 [case(DRSUAPI_DC_INFO_CTR_2
)] drsuapi_DsGetDCInfoCtr2 ctr2
;
1170 [case(DRSUAPI_DC_INFO_CTR_3
)] drsuapi_DsGetDCInfoCtr3 ctr3
;
1171 [case(DRSUAPI_DC_CONNECTION_CTR_01
)] drsuapi_DsGetDCConnectionCtr01 ctr01
;
1172 } drsuapi_DsGetDCInfoCtr
;
1174 WERROR drsuapi_DsGetDomainControllerInfo
(
1175 [in] policy_handle
*bind_handle
,
1177 [in,ref,switch_is(level
)] drsuapi_DsGetDCInfoRequest
*req
,
1178 [out,ref] int32
*level_out
,
1179 [out,ref,switch_is(*level_out
)] drsuapi_DsGetDCInfoCtr
*ctr
1184 typedef [public,noprint
] struct {
1185 drsuapi_DsReplicaObjectListItem
*next_object
;
1186 drsuapi_DsReplicaObject
object;
1187 } drsuapi_DsReplicaObjectListItem
;
1190 * The DsAddEntry() call which creates a nTDSDSA object,
1191 * also adds a servicePrincipalName in the following form
1192 * to the computer account of the new domain controller
1193 * referenced by the "serverReferenece" attribute.
1195 * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
1197 * also note that the "serverReference" isn't added to the new object!
1199 const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID
= "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
1202 * please note the the current idl
1203 * for DsAddEntry does only parse
1204 * what I saw between 2 w2k3 boxes
1205 * in my dssync experiments I got some other replies
1206 * so all I want to say is that this is very incomplete yet...
1210 drsuapi_DsReplicaObjectListItem first_object
;
1211 } drsuapi_DsAddEntryRequest2
;
1213 typedef [switch_type(int32
)] union {
1214 [case(2)] drsuapi_DsAddEntryRequest2 req2
;
1215 } drsuapi_DsAddEntryRequest
;
1222 } drsuapi_DsAddEntryErrorInfoX
;
1225 [range(0,10485760)] uint32 size
;
1226 [size_is(size
)] uint8
*data
;
1227 } drsuapi_DsAddEntryExtraErrorBuffer
;
1230 drsuapi_DsAddEntryErrorInfoX error
;
1231 drsuapi_DsAttributeId attid
;
1233 drsuapi_DsAddEntryExtraErrorBuffer buffer
;
1234 } drsuapi_DsAddEntryExtraError1
;
1236 typedef /*[noprint]*/ struct {
1237 drsuapi_DsAddEntryErrorListItem1
*next
;
1238 drsuapi_DsAddEntryExtraError1 error
;
1239 } drsuapi_DsAddEntryErrorListItem1
;
1242 drsuapi_DsReplicaObjectIdentifier
*id;
1244 drsuapi_DsAddEntryErrorListItem1 first
;
1245 } drsuapi_DsAddEntryErrorInfo1
;
1247 typedef [switch_type(uint32
)] union {
1248 [case(1)] drsuapi_DsAddEntryErrorInfo1 error1
;
1249 /* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
1250 [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
1251 */ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX
;
1252 [case(5)] drsuapi_DsAddEntryErrorInfoX errorX
;
1253 [case(6)] drsuapi_DsAddEntryErrorInfoX errorX
;
1254 [case(7)] drsuapi_DsAddEntryErrorInfoX errorX
;
1255 } drsuapi_DsAddEntryErrorInfo
;
1260 [switch_is(level
)] drsuapi_DsAddEntryErrorInfo
*info
;
1261 } drsuapi_DsAddEntryError1
;
1263 typedef [switch_type(uint32
)] union {
1264 [case(1)] drsuapi_DsAddEntryError1 info1
;
1265 } drsuapi_DsAddEntryError
;
1270 } drsuapi_DsReplicaObjectIdentifier2
;
1273 drsuapi_DsReplicaObjectIdentifier
*id;
1275 drsuapi_DsAddEntryErrorInfoX error
;
1276 [range(0,10000)] uint32 count
;
1277 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1278 } drsuapi_DsAddEntryCtr2
;
1281 drsuapi_DsReplicaObjectIdentifier
*id;
1283 [switch_is(level
)] drsuapi_DsAddEntryError
*error
;
1284 [range(0,10000)] uint32 count
;
1285 [size_is(count
)] drsuapi_DsReplicaObjectIdentifier2
*objects
;
1286 } drsuapi_DsAddEntryCtr3
;
1288 typedef [switch_type(int32
)] union {
1289 [case(2)] drsuapi_DsAddEntryCtr2 ctr2
;
1290 [case(3)] drsuapi_DsAddEntryCtr3 ctr3
;
1291 } drsuapi_DsAddEntryCtr
;
1293 [public] WERROR drsuapi_DsAddEntry
(
1294 [in] policy_handle
*bind_handle
,
1296 [in,ref,switch_is(level
)] drsuapi_DsAddEntryRequest
*req
,
1297 [out,ref] int32
*level_out
,
1298 [out,ref,switch_is(*level_out
)] drsuapi_DsAddEntryCtr
*ctr
1304 DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION
= 0x00000001,
1305 DRSUAPI_DS_EXECUTE_KCC_DAMPED
= 0x00000002
1306 } drsuapi_DsExecuteKCCFlags
;
1310 drsuapi_DsExecuteKCCFlags flags
;
1311 } drsuapi_DsExecuteKCC1
;
1313 typedef [switch_type(uint32
)] union {
1314 [case(1)] drsuapi_DsExecuteKCC1 ctr1
;
1315 } drsuapi_DsExecuteKCCRequest
;
1317 WERROR drsuapi_DsExecuteKCC
(
1318 [in] policy_handle
*bind_handle
,
1320 [in, ref, switch_is(level
)] drsuapi_DsExecuteKCCRequest
*req
1325 typedef [v1_enum] enum {
1326 DRSUAPI_DS_REPLICA_GET_INFO
= 1,
1327 DRSUAPI_DS_REPLICA_GET_INFO2
= 2
1328 } drsuapi_DsReplicaGetInfoLevel
;
1330 typedef [v1_enum] enum {
1331 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
= 0,
1332 DRSUAPI_DS_REPLICA_INFO_CURSORS
= 1,
1333 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
= 2,
1334 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
= 3,
1335 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
= 4,
1336 DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
= 5,
1337 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
= 6,
1338 DRSUAPI_DS_REPLICA_INFO_CURSORS2
= 7,
1339 DRSUAPI_DS_REPLICA_INFO_CURSORS3
= 8,
1340 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
= 9,
1341 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
= 10,
1342 DRSUAPI_DS_REPLICA_INFO_REPSTO
= -2,
1343 DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS
= -4,
1344 DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1
= -5,
1345 DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS
= -6
1346 } drsuapi_DsReplicaInfoType
;
1349 drsuapi_DsReplicaInfoType info_type
;
1350 [charset
(UTF16
),string] uint16
*object_dn
;
1351 GUID source_dsa_guid
;
1352 } drsuapi_DsReplicaGetInfoRequest1
;
1355 drsuapi_DsReplicaInfoType info_type
;
1356 [charset
(UTF16
),string] uint16
*object_dn
;
1357 GUID source_dsa_guid
;
1359 [charset
(UTF16
),string] uint16
*attribute_name
;
1360 [charset
(UTF16
),string] uint16
*value_dn_str
;
1361 uint32 enumeration_context
;
1362 } drsuapi_DsReplicaGetInfoRequest2
;
1364 typedef [switch_type(drsuapi_DsReplicaGetInfoLevel
)] union {
1365 [case(DRSUAPI_DS_REPLICA_GET_INFO
)] drsuapi_DsReplicaGetInfoRequest1 req1
;
1366 [case(DRSUAPI_DS_REPLICA_GET_INFO2
)] drsuapi_DsReplicaGetInfoRequest2 req2
;
1367 } drsuapi_DsReplicaGetInfoRequest
;
1370 [charset
(UTF16
),string] uint16
*naming_context_dn
;
1371 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1372 [charset
(UTF16
),string] uint16
*source_dsa_address
;
1373 [charset
(UTF16
),string] uint16
*transport_obj_dn
;
1374 drsuapi_DrsOptions replica_flags
;
1376 GUID naming_context_obj_guid
;
1377 GUID source_dsa_obj_guid
;
1378 GUID source_dsa_invocation_id
;
1379 GUID transport_obj_guid
;
1380 hyper tmp_highest_usn
;
1382 NTTIME last_success
;
1383 NTTIME last_attempt
;
1384 WERROR result_last_attempt
;
1385 uint32 consecutive_sync_failures
;
1386 } drsuapi_DsReplicaNeighbour
;
1391 [size_is(count
)] drsuapi_DsReplicaNeighbour array
[];
1392 } drsuapi_DsReplicaNeighbourCtr
;
1397 [size_is(count
)] drsuapi_DsReplicaCursor array
[];
1398 } drsuapi_DsReplicaCursorCtr
;
1401 [charset
(UTF16
),string] uint16
*attribute_name
;
1403 NTTIME originating_change_time
;
1404 GUID originating_invocation_id
;
1405 hyper originating_usn
;
1407 } drsuapi_DsReplicaObjMetaData
;
1412 [size_is(count
)] drsuapi_DsReplicaObjMetaData array
[];
1413 } drsuapi_DsReplicaObjMetaDataCtr
;
1416 [charset
(UTF16
),string] uint16
*dsa_obj_dn
;
1418 NTTIME first_failure
;
1419 uint32 num_failures
;
1421 } drsuapi_DsReplicaKccDsaFailure
;
1426 [size_is(count
)] drsuapi_DsReplicaKccDsaFailure array
[];
1427 } drsuapi_DsReplicaKccDsaFailuresCtr
;
1430 DRSUAPI_DS_REPLICA_OP_TYPE_SYNC
= 0,
1431 DRSUAPI_DS_REPLICA_OP_TYPE_ADD
= 1,
1432 DRSUAPI_DS_REPLICA_OP_TYPE_DELETE
= 2,
1433 DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY
= 3,
1434 DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS
= 4
1435 } drsuapi_DsReplicaOpType
;
1438 NTTIME operation_start
;
1439 uint32 serial_num
; /* unique till reboot */
1441 drsuapi_DsReplicaOpType operation_type
;
1442 drsuapi_DrsOptions options
;
1443 [charset
(UTF16
),string] uint16
*nc_dn
;
1444 [charset
(UTF16
),string] uint16
*remote_dsa_obj_dn
;
1445 [charset
(UTF16
),string] uint16
*remote_dsa_address
;
1447 GUID remote_dsa_obj_guid
;
1448 } drsuapi_DsReplicaOp
;
1453 [size_is(count
)] drsuapi_DsReplicaOp array
[];
1454 } drsuapi_DsReplicaOpCtr
;
1457 [charset
(UTF16
),string] uint16
*attribute_name
;
1458 [charset
(UTF16
),string] uint16
*object_dn
;
1459 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1464 NTTIME originating_change_time
;
1465 GUID originating_invocation_id
;
1466 hyper originating_usn
;
1468 } drsuapi_DsReplicaAttrValMetaData
;
1472 uint32 enumeration_context
;
1473 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData array
[];
1474 } drsuapi_DsReplicaAttrValMetaDataCtr
;
1478 uint32 enumeration_context
;
1479 [size_is(count
)] drsuapi_DsReplicaCursor2 array
[];
1480 } drsuapi_DsReplicaCursor2Ctr
;
1483 GUID source_dsa_invocation_id
;
1485 NTTIME last_sync_success
;
1486 [charset
(UTF16
),string] uint16
*source_dsa_obj_dn
;
1487 } drsuapi_DsReplicaCursor3
;
1491 uint32 enumeration_context
;
1492 [size_is(count
)] drsuapi_DsReplicaCursor3 array
[];
1493 } drsuapi_DsReplicaCursor3Ctr
;
1496 [charset
(UTF16
),string] uint16
*attribute_name
;
1498 NTTIME originating_change_time
;
1499 GUID originating_invocation_id
;
1500 hyper originating_usn
;
1502 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1503 } drsuapi_DsReplicaObjMetaData2
;
1507 uint32 enumeration_context
;
1508 [size_is(count
)] drsuapi_DsReplicaObjMetaData2 array
[];
1509 } drsuapi_DsReplicaObjMetaData2Ctr
;
1512 [charset
(UTF16
),string] uint16
*attribute_name
;
1513 [charset
(UTF16
),string] uint16
*object_dn
;
1514 [value
(ndr_size_DATA_BLOB
(0,binary
,0))] uint32 __ndr_size_binary
;
1519 NTTIME originating_change_time
;
1520 GUID originating_invocation_id
;
1521 hyper originating_usn
;
1523 [charset
(UTF16
),string] uint16
*originating_dsa_dn
;
1524 } drsuapi_DsReplicaAttrValMetaData2
;
1528 uint32 enumeration_context
;
1529 [size_is(count
)] drsuapi_DsReplicaAttrValMetaData2 array
[];
1530 } drsuapi_DsReplicaAttrValMetaData2Ctr
;
1533 hyper u1
; /* session number? */
1537 NTTIME_1sec bind_time
;
1538 [flag
(NDR_BIG_ENDIAN
)] ipv4address client_ip_address
;
1539 uint32 u5
; /* this is the same value the client used as pid in the DsBindInfoX struct */
1540 } drsuapi_DsReplicaConnection04
;
1543 [range(0,10000)] uint32 count
;
1545 [size_is(count
)] drsuapi_DsReplicaConnection04 array
[];
1546 } drsuapi_DsReplicaConnection04Ctr
;
1549 [charset
(UTF16
),string] uint16
*str1
;
1557 } drsuapi_DsReplica06
;
1560 [range(0,256)] uint32 count
;
1562 [size_is(count
)] drsuapi_DsReplica06 array
[];
1563 } drsuapi_DsReplica06Ctr
;
1565 typedef [switch_type(drsuapi_DsReplicaInfoType
)] union {
1566 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS
)] drsuapi_DsReplicaNeighbourCtr
*neighbours
;
1567 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS
)] drsuapi_DsReplicaCursorCtr
*cursors
;
1568 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA
)] drsuapi_DsReplicaObjMetaDataCtr
*objmetadata
;
1569 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*connectfailures
;
1570 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES
)] drsuapi_DsReplicaKccDsaFailuresCtr
*linkfailures
;
1571 [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS
)] drsuapi_DsReplicaOpCtr
*pendingops
;
1572 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA
)] drsuapi_DsReplicaAttrValMetaDataCtr
*attrvalmetadata
;
1573 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2
)] drsuapi_DsReplicaCursor2Ctr
*cursors2
;
1574 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3
)] drsuapi_DsReplicaCursor3Ctr
*cursors3
;
1575 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2
)] drsuapi_DsReplicaObjMetaData2Ctr
*objmetadata2
;
1576 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2
)] drsuapi_DsReplicaAttrValMetaData2Ctr
*attrvalmetadata2
;
1577 [case(DRSUAPI_DS_REPLICA_INFO_REPSTO
)] drsuapi_DsReplicaNeighbourCtr
*repsto
;
1578 [case(DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS
)] drsuapi_DsReplicaConnection04Ctr
*clientctx
;
1579 [case(DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1
)] drsuapi_DsReplicaCursorCtrEx
*udv1
;
1580 [case(DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS
)] drsuapi_DsReplica06Ctr
*srvoutgoingcalls
;
1581 } drsuapi_DsReplicaInfo
;
1583 WERROR drsuapi_DsReplicaGetInfo
(
1584 [in] policy_handle
*bind_handle
,
1585 [in] drsuapi_DsReplicaGetInfoLevel level
,
1586 [in,ref,switch_is(level
)] drsuapi_DsReplicaGetInfoRequest
*req
,
1587 [out,ref] drsuapi_DsReplicaInfoType
*info_type
,
1588 [out,ref,switch_is(*info_type
)] drsuapi_DsReplicaInfo
*info
1593 [todo
] WERROR DRSUAPI_ADD_SID_HISTORY
();
1599 [range(0,10000)] uint32 num_entries
;
1600 [size_is(num_entries
)] drsuapi_DsGetMembershipsCtr1
**ctrl_array
;
1601 } drsuapi_DsGetMemberships2Ctr1
;
1603 typedef [switch_type(int32
)] union {
1604 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1
;
1605 } drsuapi_DsGetMemberships2Ctr
;
1608 [range(1,10000)] uint32 num_req
;
1609 [size_is(num_req
)] drsuapi_DsGetMembershipsRequest1
**req_array
;
1610 } drsuapi_DsGetMemberships2Request1
;
1612 typedef [switch_type(int32
)] union {
1613 [case(1)] drsuapi_DsGetMemberships2Request1 req1
;
1614 } drsuapi_DsGetMemberships2Request
;
1616 WERROR drsuapi_DsGetMemberships2
(
1617 [in] policy_handle
*bind_handle
,
1619 [in,ref] [switch_is(level
)] drsuapi_DsGetMemberships2Request
*req
,
1620 [out,ref] int32
*level_out
,
1621 [out,ref] [switch_is(*level_out
)] drsuapi_DsGetMemberships2Ctr
*ctr
1626 [todo
] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS
();
1630 [todo
] WERROR DRSUAPI_GET_OBJECT_EXISTENCE
();
1637 } drsuapi_DsSiteCostInfo
;
1640 [range(0,10000)] uint32 num_info
;
1641 [size_is(num_info
)] drsuapi_DsSiteCostInfo
*info
;
1643 } drsuapi_QuerySitesByCostCtr1
;
1645 typedef [switch_type(int32
)] union {
1646 [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1
;
1647 } drsuapi_QuerySitesByCostCtr
;
1650 [charset
(UTF16
),string] uint16
*site_from
;
1651 [range(1,10000)] uint32 num_req
;
1652 [size_is(num_req
)] [charset
(UTF16
),string] uint16
**site_to
;
1654 } drsuapi_QuerySitesByCostRequest1
;
1656 typedef [switch_type(int32
)] union {
1657 [case(1)] drsuapi_QuerySitesByCostRequest1 req1
;
1658 } drsuapi_QuerySitesByCostRequest
;
1660 WERROR drsuapi_QuerySitesByCost
(
1661 [in] policy_handle
*bind_handle
,
1663 [in,ref] [switch_is(level
)] drsuapi_QuerySitesByCostRequest
*req
,
1664 [out,ref] int32
*level_out
,
1665 [out,ref] [switch_is(*level_out
)] drsuapi_QuerySitesByCostCtr
*ctr