s4: torture: Tweak the compound padding streamfile test to send 3 reads instead of...
[Samba.git] / librpc / idl / drsuapi.idl
blobdb00eb8639ea384c525a8a76abe037493535d9bf
1 #include "idl_types.h"
3 import "security.idl", "misc.idl", "lsa.idl", "samr.idl";
6 uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
7 version(4.0),
8 endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
9 authservice("ldap"),
10 helpstring("Active Directory Replication"),
11 helper("../librpc/ndr/ndr_drsuapi.h"),
12 pointer_default(unique)
14 interface drsuapi
16 typedef bitmap security_GroupAttrs security_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
59 } drsuapi_DrsOptions;
61 typedef [public,bitmap32bit] bitmap {
62 DRSUAPI_DRS_GET_TGT = 0x00000001
63 } drsuapi_DrsMoreOptions;
65 /* see DRS_MSG_REPMOD_V1 */
66 typedef [public,bitmap32bit] bitmap {
67 DRSUAPI_DRS_UPDATE_FLAGS = 0x00000001,
68 DRSUAPI_DRS_UPDATE_ADDRESS = 0x00000002,
69 DRSUAPI_DRS_UPDATE_SCHEDULE = 0x00000004
70 } drsuapi_DrsUpdate;
72 /*****************/
73 /* Function 0x00 drsuapi_DsBind() */
75 /* MS-DRSR 5.39 DRS_EXTENSIONS_INT */
76 typedef [bitmap32bit] bitmap {
77 DRSUAPI_SUPPORTED_EXTENSION_BASE = 0x00000001,
78 DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION = 0x00000002,
79 DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI = 0x00000004,
80 DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2 = 0x00000008,
81 DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS = 0x00000010,
82 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1 = 0x00000020,
83 DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION = 0x00000040,
84 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY = 0x00000080,
85 DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE = 0x00000100,
86 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2 = 0x00000200,
87 DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION = 0x00000400,
88 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2 = 0x00000800,
89 DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD= 0x00001000,
90 DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND = 0x00002000,
91 DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO = 0x00004000,
92 DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION = 0x00008000,
93 DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01 = 0x00010000,
94 DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP = 0x00020000,
95 DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY = 0x00040000,
96 DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3 = 0x00080000,
97 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5 = 0x00100000,
98 DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2 = 0x00200000,
99 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6 = 0x00400000,
100 DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS = 0x00800000,
101 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8 = 0x01000000,
102 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5 = 0x02000000,
103 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6 = 0x04000000,
105 * the following 3 have the same value
106 * repadmin.exe /bind says that
108 DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3 = 0x08000000,
109 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7 = 0x08000000,
110 DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT = 0x08000000,
111 DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS = 0x10000000,
112 DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10 = 0x20000000,
113 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2 = 0x40000000,
114 DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3 = 0x80000000
115 } drsuapi_SupportedExtensions;
117 typedef [bitmap32bit] bitmap {
118 DRSUAPI_SUPPORTED_EXTENSION_ADAM = 0x00000001,
119 DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2 = 0x00000002,
120 DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN = 0x00000004
121 } drsuapi_SupportedExtensionsExt;
123 /* this is used by w2k */
124 typedef [public] struct {
125 drsuapi_SupportedExtensions supported_extensions;
126 GUID site_guid;
127 uint32 pid;
128 } drsuapi_DsBindInfo24;
130 /* this is used by w2k3 */
131 typedef [public] struct {
132 drsuapi_SupportedExtensions supported_extensions;
133 GUID site_guid;
134 uint32 pid;
135 uint32 repl_epoch;
136 } drsuapi_DsBindInfo28;
138 typedef [public] struct {
139 drsuapi_SupportedExtensions supported_extensions;
140 GUID site_guid;
141 uint32 pid;
142 uint32 repl_epoch;
143 drsuapi_SupportedExtensionsExt supported_extensions_ext;
144 } drsuapi_DsBindInfo32;
146 /* this is used by w2k8 */
147 typedef [public] struct {
148 drsuapi_SupportedExtensions supported_extensions;
149 GUID site_guid;
150 uint32 pid;
151 uint32 repl_epoch;
152 drsuapi_SupportedExtensionsExt supported_extensions_ext;
153 GUID config_dn_guid;
154 } drsuapi_DsBindInfo48;
156 /* this is used by w2k12 R2 [MS-DRSR] Section 5.39 */
157 typedef [public] struct {
158 drsuapi_SupportedExtensions supported_extensions;
159 GUID site_guid;
160 uint32 pid;
161 uint32 repl_epoch;
162 drsuapi_SupportedExtensionsExt supported_extensions_ext;
163 GUID config_dn_guid;
164 drsuapi_SupportedExtensionsExt supported_capabilities_ext;
165 } drsuapi_DsBindInfo52;
167 typedef [public] struct {
168 [flag(NDR_REMAINING)] DATA_BLOB info;
169 } drsuapi_DsBindInfoFallBack;
171 typedef [nopull, nopush, noprint] [nodiscriminant] union {
172 [case(24)][subcontext(0), subcontext_size(24)] drsuapi_DsBindInfo24 info24;
173 [case(28)][subcontext(0), subcontext_size(28)] drsuapi_DsBindInfo28 info28;
174 [case(32)][subcontext(0), subcontext_size(32)] drsuapi_DsBindInfo32 info32;
175 [case(48)][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfo48 info48;
176 [case(52)][subcontext(0), subcontext_size(52)] drsuapi_DsBindInfo52 info52;
178 * The size for the defaut case is a bit arbitrary it in fact the value
179 * of the switch but we can't reference it.
180 * As we hand(un-)marshall this structure it has 0 impact and makes
181 * pidl happy for wireshark too
183 [default][subcontext(0), subcontext_size(48)] drsuapi_DsBindInfoFallBack Fallback;
184 } drsuapi_DsBindInfo;
186 /* the drsuapi_DsBindInfoCtr was this before
187 * typedef [flag(NDR_PAHEX)] struct {
188 * [range(1,10000)] uint32 length;
189 * [size_is(length)] uint8 data[];
190 * } drsuapi_DsBindInfo;
192 * but we don't want the caller to manually decode this blob,
193 * so we're doing it here
197 * MS-DRSR.pdf gives the following definition
198 typedef struct {
199 [range(1,10000)] DWORD cb;
200 [size_is(cb)] BYTE rgb[];
201 } DRS_EXTENSIONS;
203 But we use a subcontext which has a slighly different signification on how
204 data are laid out.
205 With the MS-DRSR definition we will have
206 size_is_cb cv rgb_array
207 with size_is_cb being a uint3264 and cv being a uint32
209 We used to have
210 typedef struct {
211 [range(1,10000)] uint32 length;
212 [switch_is(length)] drsuapi_DsBindInfo info;
213 } drsuapi_DsBindInfoCtr;
215 typedef [nodiscriminant] union {
216 [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
217 [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
218 [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
219 [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
220 } drsuapi_DsBindInfo;
222 With this definition data is laid out this way:
223 length subcontext_size drsuapi_DsBindInfoxx
224 with length being a uint32 and subcontext_size being a uint3264
226 It has clearly an impact on the way things are aligned when using NDR64
228 typedef [flag(NDR_NOALIGN)] struct {
229 [range(1,10000)] uint3264 length;
230 [value(length)] uint32 __ndr_length;
231 [switch_is(length)] drsuapi_DsBindInfo info;
232 } drsuapi_DsBindInfoCtr;
234 /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
236 * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
238 const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
240 * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
241 * as administrator and this values are also used in the destination_dsa_guid field
242 * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
244 const char *DRSUAPI_DS_BIND_GUID_W2K = "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
245 const char *DRSUAPI_DS_BIND_GUID_W2K3 = "6afab99c-6e26-464a-975f-f58f105218bc";
247 [public] WERROR drsuapi_DsBind(
248 [in,unique] GUID *bind_guid,
249 [in,out,unique] drsuapi_DsBindInfoCtr *bind_info,
250 [out] policy_handle *bind_handle
253 /*****************/
254 /* Function 0x01 */
255 WERROR drsuapi_DsUnbind(
256 [in,out] policy_handle *bind_handle
259 /*****************/
260 /* Function 0x02 */
261 typedef [public,gensize] struct {
262 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
263 [value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid;
264 GUID guid;
265 dom_sid28 sid;
266 [value(strlen_m(dn))] uint32 __ndr_size_dn;
267 [charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[];
268 } drsuapi_DsReplicaObjectIdentifier;
270 typedef struct {
271 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
272 GUID source_dsa_guid;
273 [charset(DOS),string] char *source_dsa_dns; /* Source DSA dns_name in <guid>._msdcs.<domain_dns> form */
274 drsuapi_DrsOptions options;
275 } drsuapi_DsReplicaSyncRequest1;
277 typedef [switch_type(uint32)] union {
278 [case(1)] drsuapi_DsReplicaSyncRequest1 req1;
279 } drsuapi_DsReplicaSyncRequest;
281 WERROR drsuapi_DsReplicaSync(
282 [in] policy_handle *bind_handle,
283 [in] uint32 level,
284 [in,switch_is(level)] drsuapi_DsReplicaSyncRequest *req
287 /*****************/
288 /* Function 0x03 */
289 typedef [public] struct {
290 hyper tmp_highest_usn; /* updated after each object update */
291 hyper reserved_usn;
292 hyper highest_usn; /* updated after a full replication cycle */
293 } drsuapi_DsReplicaHighWaterMark;
295 typedef [public] struct {
296 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
297 hyper highest_usn; /* updated after a full replication cycle */
298 } drsuapi_DsReplicaCursor;
300 typedef struct {
301 [value(1)] uint32 version;
302 [value(0)] uint32 reserved1;
303 [range(0,0x100000)] uint32 count;
304 [value(0)] uint32 reserved2;
305 [size_is(count)] drsuapi_DsReplicaCursor cursors[];
306 } drsuapi_DsReplicaCursorCtrEx;
308 typedef [flag(NDR_PAHEX),v1_enum] enum {
309 DRSUAPI_EXOP_NONE = 0x00000000,
310 DRSUAPI_EXOP_FSMO_REQ_ROLE = 0x00000001,
311 DRSUAPI_EXOP_FSMO_RID_ALLOC = 0x00000002,
312 DRSUAPI_EXOP_FSMO_RID_REQ_ROLE = 0x00000003,
313 DRSUAPI_EXOP_FSMO_REQ_PDC = 0x00000004,
314 DRSUAPI_EXOP_FSMO_ABANDON_ROLE = 0x00000005,
315 DRSUAPI_EXOP_REPL_OBJ = 0x00000006,
316 DRSUAPI_EXOP_REPL_SECRET = 0x00000007
317 } drsuapi_DsExtendedOperation;
319 typedef [flag(NDR_PAHEX),v1_enum] enum {
320 DRSUAPI_EXOP_ERR_NONE = 0x00000000,
321 DRSUAPI_EXOP_ERR_SUCCESS = 0x00000001,
322 DRSUAPI_EXOP_ERR_UNKNOWN_OP = 0x00000002,
323 DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER = 0x00000003,
324 DRSUAPI_EXOP_ERR_UPDATE_ERR = 0x00000004,
325 DRSUAPI_EXOP_ERR_EXCEPTION = 0x00000005,
326 DRSUAPI_EXOP_ERR_UNKNOWN_CALLER = 0x00000006,
327 DRSUAPI_EXOP_ERR_RID_ALLOC = 0x00000007,
328 DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED = 0x00000008,
329 DRSUAPI_EXOP_ERR_FMSO_PENDING_OP = 0x00000009,
330 DRSUAPI_EXOP_ERR_MISMATCH = 0x0000000A,
331 DRSUAPI_EXOP_ERR_COULDNT_CONTACT = 0x0000000B,
332 DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES = 0x0000000C,
333 DRSUAPI_EXOP_ERR_DIR_ERROR = 0x0000000D,
334 DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS = 0x0000000E,
335 DRSUAPI_EXOP_ERR_ACCESS_DENIED = 0x0000000F,
336 DRSUAPI_EXOP_ERR_PARAM_ERROR = 0x00000010
337 } drsuapi_DsExtendedError;
339 typedef struct {
340 GUID destination_dsa_guid;
341 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
342 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
343 drsuapi_DsReplicaHighWaterMark highwatermark;
344 drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
345 drsuapi_DrsOptions replica_flags;
346 uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
347 uint32 max_ndr_size; /* w2k3 seems to ignore this */
348 drsuapi_DsExtendedOperation extended_op;
349 hyper fsmo_info;
350 } drsuapi_DsGetNCChangesRequest5;
353 * In DRSUAPI all attributes with syntax 2.5.5.2
354 * are identified by uint32 values
356 * the following table shows the mapping used between the two representations
357 * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
358 * and a UINT32-ID of '0x0017002F'.
359 * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
360 * OID-prefix: 1.2.840.113556.1.5.7000
361 * and a value: 47 => 0x2F
362 * - the mapping table gives a UINT32-prefix: 0x00170000
363 * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
365 * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
366 * array. The following are the default mappings of w2k3
368 * OID-prefix => UINT32-Id prefix
370 * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
371 * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
372 * 1.2.840.113556.1.2.* => 0x00020000
373 * 1.2.840.113556.1.3.* => 0x00030000
374 * 2.5.5.* => 0x00080000 (attributeSyntax OID's)
375 * 1.2.840.113556.1.4.* => 0x00090000
376 * 1.2.840.113556.1.5.* => 0x000A0000
377 * 2.16.840.1.113730.3.* => 0x00140000
378 * 0.9.2342.19200300.100.1.* => 0x00150000
379 * 2.16.840.1.113730.3.1.* => 0x00160000
380 * 1.2.840.113556.1.5.7000.* => 0x00170000
381 * 2.5.21.* => 0x00180000 (attrs for SubSchema)
382 * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
383 * 2.5.20.* => 0x001A0000
384 * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
385 * 2.16.840.1.113730.3.2.* => 0x001C0000
386 * 1.3.6.1.4.1.250.1.* => 0x001D0000
387 * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
388 * 0.9.2342.19200300.100.4.* => 0x001F0000
390 * Here's a list of used 'attributeSyntax' OID's
392 * 2.5.5.1 => Object(DS-DN) string
393 * struct drsuapi_DsObjectIdentifier3
395 * 2.5.5.2 => OID-string
396 * => all values are represented as uint32 values in drsuapi
397 * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
398 * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
399 * are returned as attribute names
401 * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
403 * 2.5.5.5 => String(IA5) case-sensitive string
405 * 2.5.5.6 => String(Numeric)
406 * => eg. internationalISDNNumber
408 * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
409 * => e.g. wellKnownObjects
411 * 2.5.5.8 => BOOL
413 * 2.5.5.9 => int32
415 * 2.5.5.10 => DATA_BLOB
416 * => struct GUID
418 * 2.5.5.11 => LDAP timestring
419 * => NTTIME_1sec
421 * 2.5.5.12 => String(Unicode) case-insensitive string
422 * => 'standard strings'
424 * 2.5.5.13 => Object(Presentation-Address) string
425 * => used in objectClass applicationEntity
427 * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
428 * => not used
430 * 2.5.5.15 => ntSecurityDescriptor
432 * 2.5.5.16 => int64
434 * 2.5.5.17 => dom_sid
436 typedef [noprint] struct {
437 [range(0,10000)] uint32 length;
438 [size_is(length)] uint8 *binary_oid; /* partial-binary-OID encoded with asn1_write_partial_OID_String() */
439 } drsuapi_DsReplicaOID;
441 typedef struct {
442 uint32 id_prefix;
443 drsuapi_DsReplicaOID oid;
444 } drsuapi_DsReplicaOIDMapping;
446 typedef [public] struct {
447 [range(0,0x100000)] uint32 num_mappings;
448 [size_is(num_mappings)] drsuapi_DsReplicaOIDMapping *mappings;
449 } drsuapi_DsReplicaOIDMapping_Ctr;
451 typedef [flag(NDR_PAHEX),v1_enum] enum {
452 DRSUAPI_OBJECTCLASS_top = 0x00010000,
453 DRSUAPI_OBJECTCLASS_classSchema = 0x0003000d,
454 DRSUAPI_OBJECTCLASS_attributeSchema = 0x0003000e
455 } drsuapi_DsObjectClassId;
457 typedef [flag(NDR_PAHEX),v1_enum,public] enum {
458 DRSUAPI_ATTID_objectClass = 0x00000000,
459 DRSUAPI_ATTID_cn = 0x00000003,
460 DRSUAPI_ATTID_ou = 0x0000000b,
461 DRSUAPI_ATTID_description = 0x0000000d,
462 DRSUAPI_ATTID_member = 0x0000001f,
463 DRSUAPI_ATTID_distinguishedName = 0x00000031,
464 DRSUAPI_ATTID_instanceType = 0x00020001,
465 DRSUAPI_ATTID_whenCreated = 0x00020002,
466 DRSUAPI_ATTID_possSuperiors = 0x00020008,
467 DRSUAPI_ATTID_displayName = 0x0002000d,
468 DRSUAPI_ATTID_hasMasterNCs = 0x0002000e,
469 DRSUAPI_ATTID_nCName = 0x00020010,
470 DRSUAPI_ATTID_subClassOf = 0x00020015,
471 DRSUAPI_ATTID_governsID = 0x00020016,
472 DRSUAPI_ATTID_mustContain = 0x00020018,
473 DRSUAPI_ATTID_mayContain = 0x00020019,
474 DRSUAPI_ATTID_rDNAttId = 0x0002001A,
475 DRSUAPI_ATTID_attributeID = 0x0002001e,
476 DRSUAPI_ATTID_attributeSyntax = 0x00020020,
477 DRSUAPI_ATTID_isSingleValued = 0x00020021,
478 DRSUAPI_ATTID_rangeLower = 0x00020022,
479 DRSUAPI_ATTID_rangeUpper = 0x00020023,
480 DRSUAPI_ATTID_dMDLocation = 0x00020024,
481 DRSUAPI_ATTID_isDeleted = 0x00020030,
482 DRSUAPI_ATTID_objectVersion = 0x0002004c,
483 DRSUAPI_ATTID_invocationId = 0x00020073,
484 DRSUAPI_ATTID_showInAdvancedViewOnly = 0x000200a9,
485 DRSUAPI_ATTID_adminDisplayName = 0x000200c2,
486 DRSUAPI_ATTID_adminDescription = 0x000200e2,
487 DRSUAPI_ATTID_oMSyntax = 0x000200e7,
488 DRSUAPI_ATTID_ntSecurityDescriptor = 0x00020119,
489 DRSUAPI_ATTID_searchFlags = 0x0002014e,
490 DRSUAPI_ATTID_auxiliaryClass = 0x0002015f,
491 DRSUAPI_ATTID_lDAPDisplayName = 0x000201cc,
492 DRSUAPI_ATTID_name = 0x00090001,
493 DRSUAPI_ATTID_objectGUID = 0x00090002,
494 DRSUAPI_ATTID_replPropertyMetaData = 0x00090003,
495 DRSUAPI_ATTID_userAccountControl = 0x00090008,
496 DRSUAPI_ATTID_badPwdCount = 0x0009000c,
497 DRSUAPI_ATTID_codePage = 0x00090010,
498 DRSUAPI_ATTID_countryCode = 0x00090019,
499 DRSUAPI_ATTID_currentValue = 0x0009001b,
500 DRSUAPI_ATTID_homeDirectory = 0x0009002c,
501 DRSUAPI_ATTID_homeDrive = 0x0009002d,
502 DRSUAPI_ATTID_lastLogoff = 0x00090033,
503 DRSUAPI_ATTID_lastLogon = 0x00090034,
504 DRSUAPI_ATTID_dBCSPwd = 0x00090037,/* lmPwdHash */
505 DRSUAPI_ATTID_scriptPath = 0x0009003e,
506 DRSUAPI_ATTID_logonHours = 0x00090040,
507 DRSUAPI_ATTID_userWorkstations = 0x00090056,
508 DRSUAPI_ATTID_unicodePwd = 0x0009005a,/* ntPwdHash */
509 DRSUAPI_ATTID_ntPwdHistory = 0x0009005e,
510 DRSUAPI_ATTID_pwdLastSet = 0x00090060,
511 DRSUAPI_ATTID_primaryGroupID = 0x00090062,
512 DRSUAPI_ATTID_priorValue = 0x00090064,
513 DRSUAPI_ATTID_supplementalCredentials = 0x0009007d,
514 DRSUAPI_ATTID_trustAuthIncoming = 0x00090081,
515 DRSUAPI_ATTID_trustAuthOutgoing = 0x00090087,
516 DRSUAPI_ATTID_userParameters = 0x0009008a,
517 DRSUAPI_ATTID_profilePath = 0x0009008b,
518 DRSUAPI_ATTID_operatorCount = 0x00090090,
519 DRSUAPI_ATTID_objectSid = 0x00090092,
520 DRSUAPI_ATTID_schemaIDGUID = 0x00090094,
521 DRSUAPI_ATTID_adminCount = 0x00090096,
522 DRSUAPI_ATTID_comment = 0x0009009C,/* User-Comment */
523 DRSUAPI_ATTID_accountExpires = 0x0009009f,
524 DRSUAPI_ATTID_lmPwdHistory = 0x000900a0,
525 DRSUAPI_ATTID_logonCount = 0x000900a9,
526 DRSUAPI_ATTID_systemPossSuperiors = 0x000900c3,
527 DRSUAPI_ATTID_systemMayContain = 0x000900c4,
528 DRSUAPI_ATTID_systemMustContain = 0x000900c5,
529 DRSUAPI_ATTID_systemAuxiliaryClass = 0x000900c6,
530 DRSUAPI_ATTID_sAMAccountName = 0x000900dd,
531 DRSUAPI_ATTID_sAMAccountType = 0x0009012e,
532 DRSUAPI_ATTID_options = 0x00090133,
533 DRSUAPI_ATTID_fSMORoleOwner = 0x00090171,
534 DRSUAPI_ATTID_systemFlags = 0x00090177,
535 DRSUAPI_ATTID_serverReference = 0x00090203,
536 DRSUAPI_ATTID_serverReferenceBL = 0x00090204,
537 DRSUAPI_ATTID_nonSecurityMember = 0x00090212,
538 DRSUAPI_ATTID_initialAuthIncoming = 0x0009021b,
539 DRSUAPI_ATTID_initialAuthOutgoing = 0x0009021c,
540 DRSUAPI_ATTID_wellKnownObjects = 0x0009026a,
541 DRSUAPI_ATTID_dNSHostName = 0x0009026b,
542 DRSUAPI_ATTID_isMemberOfPartialAttributeSet = 0x0009027f,
543 DRSUAPI_ATTID_managedBy = 0x0009028d,
544 DRSUAPI_ATTID_userPrincipalName = 0x00090290,
545 DRSUAPI_ATTID_groupType = 0x000902ee,
546 DRSUAPI_ATTID_servicePrincipalName = 0x00090303,
547 DRSUAPI_ATTID_lastKnownParent = 0x0009030d,
548 DRSUAPI_ATTID_objectCategory = 0x0009030e,
549 DRSUAPI_ATTID_gPLink = 0x0009037b,
550 DRSUAPI_ATTID_transportAddressAttribute = 0x0009037f,
551 DRSUAPI_ATTID_schemaInfo = 0x0009054e,
552 DRSUAPI_ATTID_msDS_Behavior_Version = 0x000905b3,
553 DRSUAPI_ATTID_msDS_KeyVersionNumber = 0x000906f6,
554 DRSUAPI_ATTID_msDS_NonMembers = 0x00090701,
555 DRSUAPI_ATTID_msDS_MembersForAzRole = 0x0009070e,
556 DRSUAPI_ATTID_msDS_HasDomainNCs = 0x0009071c,
557 DRSUAPI_ATTID_msDS_hasMasterNCs = 0x0009072c,
558 DRSUAPI_ATTID_msDS_NeverRevealGroup = 0x00090786,
559 DRSUAPI_ATTID_msDS_RevealOnDemandGroup = 0x00090788,
560 DRSUAPI_ATTID_msDS_HostServiceAccount = 0x00090808,
561 DRSUAPI_ATTID_isRecycled = 0x0009080a,
563 DRSUAPI_ATTID_INVALID = 0xFFFFFFFF
564 } drsuapi_DsAttributeId;
566 typedef struct {
567 [value(1)] uint32 version;
568 [value(0)] uint32 reserved1;
569 [range(1,0x100000)] uint32 num_attids;
570 [size_is(num_attids)] drsuapi_DsAttributeId attids[];
571 } drsuapi_DsPartialAttributeSet;
573 typedef [public] struct {
574 GUID destination_dsa_guid;
575 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
576 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
577 drsuapi_DsReplicaHighWaterMark highwatermark;
578 drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
579 drsuapi_DrsOptions replica_flags;
580 uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
581 uint32 max_ndr_size; /* w2k3 seems to ignore this */
582 drsuapi_DsExtendedOperation extended_op;
583 hyper fsmo_info;
584 drsuapi_DsPartialAttributeSet *partial_attribute_set;
585 drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
586 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
587 } drsuapi_DsGetNCChangesRequest8;
589 typedef [public] struct {
590 GUID destination_dsa_guid;
591 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
592 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
593 drsuapi_DsReplicaHighWaterMark highwatermark;
594 drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
595 drsuapi_DrsOptions replica_flags;
596 uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
597 uint32 max_ndr_size; /* w2k3 seems to ignore this */
598 drsuapi_DsExtendedOperation extended_op;
599 hyper fsmo_info;
600 drsuapi_DsPartialAttributeSet *partial_attribute_set;
601 drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
602 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
603 drsuapi_DrsMoreOptions more_flags;
604 } drsuapi_DsGetNCChangesRequest10;
606 typedef [switch_type(uint32)] union {
607 [case(5)] drsuapi_DsGetNCChangesRequest5 req5;
608 [case(8)] drsuapi_DsGetNCChangesRequest8 req8;
609 [case(10)] drsuapi_DsGetNCChangesRequest10 req10;
610 } drsuapi_DsGetNCChangesRequest;
612 typedef [public] struct {
613 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
614 hyper highest_usn; /* updated after a full replication cycle */
615 NTTIME last_sync_success;
616 } drsuapi_DsReplicaCursor2;
618 typedef struct {
619 [value(2)] uint32 version;
620 [value(0)] uint32 reserved1;
621 [range(0,0x100000)] uint32 count;
622 [value(0)] uint32 reserved2;
623 [size_is(count)] drsuapi_DsReplicaCursor2 cursors[];
624 } drsuapi_DsReplicaCursor2CtrEx;
626 /* Generic DATA_BLOB values */
627 typedef struct {
628 [range(0,26214400),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
629 DATA_BLOB *blob;
630 } drsuapi_DsAttributeValue;
632 typedef struct {
633 [range(0,10485760)] uint32 num_values;
634 [size_is(num_values)] drsuapi_DsAttributeValue *values;
635 } drsuapi_DsAttributeValueCtr;
637 /* DN String values */
638 typedef [public,gensize] struct {
639 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
640 [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
641 GUID guid;
642 dom_sid28 sid;
643 [value(strlen_m(dn))] uint32 __ndr_size_dn;
644 [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
645 } drsuapi_DsReplicaObjectIdentifier3;
647 typedef [public] struct {
648 [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary_without_Binary(r, ndr->flags))] uint32 __ndr_size;
649 [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
650 GUID guid;
651 dom_sid28 sid;
652 [value(strlen_m(dn))] uint32 __ndr_size_dn;
653 [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
654 [value(binary.length + 4)] uint32 __ndr_size_binary;
655 [flag(NDR_REMAINING)] DATA_BLOB binary;
656 } drsuapi_DsReplicaObjectIdentifier3Binary;
658 typedef [public,noprint] struct {
659 drsuapi_DsAttributeId attid;
660 drsuapi_DsAttributeValueCtr value_ctr;
661 } drsuapi_DsReplicaAttribute;
663 typedef struct {
664 [range(0,1048576)] uint32 num_attributes;
665 [size_is(num_attributes)] drsuapi_DsReplicaAttribute *attributes;
666 } drsuapi_DsReplicaAttributeCtr;
668 typedef [public] bitmap {
669 DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER = 0x00000001,
670 DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC = 0x00000002,
671 DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY = 0x00010000
672 } drsuapi_DsReplicaObjectFlags;
674 typedef [public] struct {
675 drsuapi_DsReplicaObjectIdentifier *identifier;
676 drsuapi_DsReplicaObjectFlags flags;
677 drsuapi_DsReplicaAttributeCtr attribute_ctr;
678 } drsuapi_DsReplicaObject;
680 typedef struct {
681 uint32 version;
682 NTTIME_1sec originating_change_time;
683 GUID originating_invocation_id;
684 hyper originating_usn;
685 } drsuapi_DsReplicaMetaData;
687 typedef [public] struct {
688 [range(0,1048576)] uint32 count;
689 [size_is(count)] drsuapi_DsReplicaMetaData meta_data[];
690 } drsuapi_DsReplicaMetaDataCtr;
692 typedef [public,noprint] struct {
693 [max_recursion(20000)]
694 drsuapi_DsReplicaObjectListItemEx *next_object;
695 drsuapi_DsReplicaObject object;
696 boolean32 is_nc_prefix;
697 GUID *parent_object_guid;
698 drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
699 } drsuapi_DsReplicaObjectListItemEx;
701 typedef [public,gensize] struct {
702 GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
703 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
704 drsuapi_DsReplicaObjectIdentifier *naming_context;
705 drsuapi_DsReplicaHighWaterMark old_highwatermark;
706 drsuapi_DsReplicaHighWaterMark new_highwatermark;
707 drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
708 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
709 drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
710 uint32 object_count;
711 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
712 [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
713 drsuapi_DsReplicaObjectListItemEx *first_object;
714 boolean32 more_data;
715 } drsuapi_DsGetNCChangesCtr1;
718 * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
719 * isn't there it means the value is deleted
721 typedef [public] bitmap {
722 DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE = 0x00000001
723 } drsuapi_DsLinkedAttributeFlags;
725 typedef [public] struct {
726 drsuapi_DsReplicaObjectIdentifier *identifier;
727 drsuapi_DsAttributeId attid;
728 drsuapi_DsAttributeValue value;
729 drsuapi_DsLinkedAttributeFlags flags;
730 NTTIME_1sec originating_add_time;
731 drsuapi_DsReplicaMetaData meta_data;
732 } drsuapi_DsReplicaLinkedAttribute;
734 /* [MS-DRSR] section 4.1.10.2.11 DRS_MSG_GETCHGREPLY_V6 */
735 typedef [public,gensize] struct {
736 GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
737 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
738 drsuapi_DsReplicaObjectIdentifier *naming_context;
739 drsuapi_DsReplicaHighWaterMark old_highwatermark;
740 drsuapi_DsReplicaHighWaterMark new_highwatermark;
741 drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
742 drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
743 drsuapi_DsExtendedError extended_ret;
744 uint32 object_count;
745 /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
746 [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
747 drsuapi_DsReplicaObjectListItemEx *first_object;
748 boolean32 more_data;
749 uint32 nc_object_count; /* estimated amount of objects in the whole NC */
750 uint32 nc_linked_attributes_count; /* estimated amount of linked values in the whole NC */
751 [range(0,1048576)] uint32 linked_attributes_count;
752 [size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes;
753 WERROR drs_error;
754 } drsuapi_DsGetNCChangesCtr6;
756 typedef [public] struct {
757 [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1;
758 } drsuapi_DsGetNCChangesCtr1TS;
760 typedef [public] struct {
761 [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6;
762 } drsuapi_DsGetNCChangesCtr6TS;
764 typedef [nopush] struct {
765 uint32 decompressed_length;
766 uint32 compressed_length;
767 [subcontext(4),subcontext_size(compressed_length),
768 compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
769 drsuapi_DsGetNCChangesCtr1TS *ts;
770 } drsuapi_DsGetNCChangesMSZIPCtr1;
772 typedef [nopush] struct {
773 uint32 decompressed_length;
774 uint32 compressed_length;
775 [subcontext(4),subcontext_size(compressed_length),
776 compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
777 drsuapi_DsGetNCChangesCtr6TS *ts;
778 } drsuapi_DsGetNCChangesMSZIPCtr6;
780 typedef [nopush] struct {
781 uint32 decompressed_length;
782 uint32 compressed_length;
783 [subcontext(4),subcontext_size(compressed_length),
784 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
785 drsuapi_DsGetNCChangesCtr1TS *ts;
786 } drsuapi_DsGetNCChangesXPRESSCtr1;
788 typedef [nopush] struct {
789 uint32 decompressed_length;
790 uint32 compressed_length;
791 [subcontext(4),subcontext_size(compressed_length),
792 compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
793 drsuapi_DsGetNCChangesCtr6TS *ts;
794 } drsuapi_DsGetNCChangesXPRESSCtr6;
796 typedef [enum16bit] enum {
797 DRSUAPI_COMPRESSION_TYPE_MSZIP = 2,
798 DRSUAPI_COMPRESSION_TYPE_XPRESS = 3
799 } drsuapi_DsGetNCChangesCompressionType;
801 typedef [nodiscriminant,flag(NDR_PAHEX)] union {
802 [case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
803 [case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6;
804 [case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1;
805 [case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6;
806 } drsuapi_DsGetNCChangesCompressedCtr;
808 typedef struct {
809 drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
810 } drsuapi_DsGetNCChangesCtr2;
812 typedef struct {
813 [range(0,6)] uint32 level;
814 [range(2,3)] drsuapi_DsGetNCChangesCompressionType type;
815 [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
816 } drsuapi_DsGetNCChangesCtr7;
818 typedef [switch_type(uint32)] union {
819 [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1;
820 [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2;
821 [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6;
822 [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7;
823 } drsuapi_DsGetNCChangesCtr;
825 WERROR drsuapi_DsGetNCChanges(
826 [in] policy_handle *bind_handle,
827 [in] uint32 level,
828 [in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req,
829 [out,ref] uint32 *level_out,
830 [out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr
833 /*****************/
834 /* Function 0x04 */
835 /* [MS-DRSR] 4.1.26 */
837 typedef struct {
838 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
839 [ref,charset(DOS),string] uint8 *dest_dsa_dns_name;
840 GUID dest_dsa_guid;
841 drsuapi_DrsOptions options;
842 } drsuapi_DsReplicaUpdateRefsRequest1;
844 typedef [switch_type(uint32)] union {
845 [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1;
846 } drsuapi_DsReplicaUpdateRefsRequest;
848 WERROR drsuapi_DsReplicaUpdateRefs(
849 [in] policy_handle *bind_handle,
850 [in] uint32 level,
851 [in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req
854 /*****************/
855 /* Function 0x05 */
857 typedef struct {
858 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
859 [charset(UTF16),string] uint16 *source_dsa_address;
860 uint8 schedule[84];
861 drsuapi_DrsOptions options;
862 } drsuapi_DsReplicaAddRequest1;
864 typedef struct {
865 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
866 drsuapi_DsReplicaObjectIdentifier *source_dsa_dn;
867 drsuapi_DsReplicaObjectIdentifier *transport_dn;
868 [charset(UTF16),string] uint16 *source_dsa_address;
869 uint8 schedule[84];
870 drsuapi_DrsOptions options;
871 } drsuapi_DsReplicaAddRequest2;
873 typedef [switch_type(uint32)] union {
874 [case(1)] drsuapi_DsReplicaAddRequest1 req1;
875 [case(2)] drsuapi_DsReplicaAddRequest2 req2;
876 } drsuapi_DsReplicaAddRequest;
878 WERROR drsuapi_DsReplicaAdd(
879 [in] policy_handle *bind_handle,
880 [in] uint32 level,
881 [in,switch_is(level)] drsuapi_DsReplicaAddRequest req
885 /*****************/
886 /* Function 0x06 */
887 typedef struct {
888 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
889 [charset(UTF8), string] uint8 *source_dsa_address;
890 drsuapi_DrsOptions options;
891 } drsuapi_DsReplicaDelRequest1;
893 typedef [switch_type(uint32)] union {
894 [case(1)] drsuapi_DsReplicaDelRequest1 req1;
895 } drsuapi_DsReplicaDelRequest;
897 WERROR drsuapi_DsReplicaDel(
898 [in] policy_handle *bind_handle,
899 [in] uint32 level,
900 [in,switch_is(level)] drsuapi_DsReplicaDelRequest req
903 /*****************/
904 /* Function 0x07 */
906 typedef struct {
907 [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
908 GUID source_dra;
909 [charset(UTF16),string] uint16 *source_dra_address;
910 uint8 schedule[84];
911 drsuapi_DrsOptions replica_flags;
912 uint32 modify_fields;
913 drsuapi_DrsOptions options;
914 } drsuapi_DsReplicaModRequest1;
916 typedef [switch_type(uint32)] union {
917 [case(1)] drsuapi_DsReplicaModRequest1 req1;
918 } drsuapi_DsReplicaModRequest;
920 WERROR drsuapi_DsReplicaMod(
921 [in] policy_handle *bind_handle,
922 [in] uint32 level,
923 [in,switch_is(level)] drsuapi_DsReplicaModRequest req
926 /*****************/
927 /* Function 0x08 */
928 [todo] WERROR DRSUAPI_VERIFY_NAMES();
930 /*****************/
931 /* Function 0x09 */
933 /* how are type 4 and 7 different from 2 and 3 ? */
934 typedef [v1_enum] enum {
935 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS = 1,
936 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS = 2,
937 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS = 3,
938 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2 = 4,
939 DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS = 5,
940 DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS = 6,
941 DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2 = 7
942 } drsuapi_DsMembershipType;
944 typedef struct {
945 NTSTATUS status;
946 [range(0,10000)] uint32 num_memberships;
947 [range(0,10000)] uint32 num_sids;
948 [size_is(num_memberships)] drsuapi_DsReplicaObjectIdentifier **info_array;
949 [size_is(num_memberships)] security_GroupAttrs *group_attrs;
950 [size_is(num_sids)] dom_sid28 **sids;
951 } drsuapi_DsGetMembershipsCtr1;
953 typedef [switch_type(uint32)] union {
954 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
955 } drsuapi_DsGetMembershipsCtr;
957 const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR = 0x1;
959 typedef struct {
960 [range(1,10000)] uint32 count;
961 [size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array;
962 uint32 flags;
963 [range(1,7)] drsuapi_DsMembershipType type;
964 drsuapi_DsReplicaObjectIdentifier *domain;
965 } drsuapi_DsGetMembershipsRequest1;
967 typedef [switch_type(uint32)] union {
968 [case(1)] drsuapi_DsGetMembershipsRequest1 req1;
969 } drsuapi_DsGetMembershipsRequest;
971 WERROR drsuapi_DsGetMemberships(
972 [in] policy_handle *bind_handle,
973 [in] uint32 level,
974 [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
975 [out,ref] uint32 *level_out,
976 [out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr
979 /*****************/
980 /* Function 0x0a */
981 [todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE();
983 /*****************/
984 /* Function 0x0b */
985 typedef [bitmap32bit] bitmap {
986 DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG = 0x00000001,
987 DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS = 0x00000002
988 } drsuapi_DsGetNT4ChangeLogFlags;
990 typedef struct {
991 drsuapi_DsGetNT4ChangeLogFlags flags;
992 uint32 preferred_maximum_length;
993 [range(0,0x00A00000)] uint32 restart_length;
994 [size_is(restart_length)] uint8 *restart_data;
995 } drsuapi_DsGetNT4ChangeLogRequest1;
997 typedef [switch_type(uint32)] union {
998 [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1;
999 } drsuapi_DsGetNT4ChangeLogRequest;
1001 typedef struct {
1002 [range(0,0x00A00000)] uint32 restart_length;
1003 [range(0,0x00A00000)] uint32 log_length;
1004 hyper sam_serial_number;
1005 NTTIME sam_creation_time;
1006 hyper builtin_serial_number;
1007 NTTIME builtin_creation_time;
1008 hyper lsa_serial_number;
1009 NTTIME lsa_creation_time;
1010 NTSTATUS status;
1011 [size_is(restart_length)] uint8 *restart_data;
1012 [size_is(log_length)] uint8 *log_data;
1013 } drsuapi_DsGetNT4ChangeLogInfo1;
1015 typedef [switch_type(uint32)] union {
1016 [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
1017 } drsuapi_DsGetNT4ChangeLogInfo;
1019 WERROR drsuapi_DsGetNT4ChangeLog(
1020 [in] policy_handle *bind_handle,
1021 [in] uint32 level,
1022 [in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req,
1023 [out,ref] uint32 *level_out,
1024 [out,ref] [switch_is(*level_out)] drsuapi_DsGetNT4ChangeLogInfo *info
1027 /*****************/
1028 /* Function 0x0c */
1029 typedef [v1_enum] enum {
1030 DRSUAPI_DS_NAME_STATUS_OK = 0,
1031 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR = 1,
1032 DRSUAPI_DS_NAME_STATUS_NOT_FOUND = 2,
1033 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE = 3,
1034 DRSUAPI_DS_NAME_STATUS_NO_MAPPING = 4,
1035 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY = 5,
1036 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING = 6,
1037 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL = 7
1038 } drsuapi_DsNameStatus;
1040 typedef [v1_enum] enum {
1041 DRSUAPI_DS_NAME_FLAG_NO_FLAGS = 0x0,
1042 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1,
1043 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC = 0x2,
1044 DRSUAPI_DS_NAME_FLAG_GCVERIFY = 0x4,
1045 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL = 0x8
1046 } drsuapi_DsNameFlags;
1048 typedef [v1_enum] enum {
1049 DRSUAPI_DS_NAME_FORMAT_UNKNOWN = 0x00000000,
1050 DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 0x00000001,
1051 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 0x00000002,
1052 DRSUAPI_DS_NAME_FORMAT_DISPLAY = 0x00000003,
1053 DRSUAPI_DS_NAME_FORMAT_GUID = 0x00000006,
1054 DRSUAPI_DS_NAME_FORMAT_CANONICAL = 0x00000007,
1055 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL = 0x00000008,
1056 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX = 0x00000009,
1057 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL = 0x0000000A,
1058 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY = 0x0000000B,
1059 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN = 0x0000000C,
1060 DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID = 0xFFFFFFEF,
1061 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX = 0xFFFFFFF0,
1062 DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS = 0xFFFFFFF1,
1063 DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON = 0xFFFFFFF2,
1064 DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE = 0xFFFFFFF3,
1065 DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME = 0xFFFFFFF4,
1066 DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME = 0xFFFFFFF5,
1067 DRSUAPI_DS_NAME_FORMAT_LIST_NCS = 0xFFFFFFF6,
1068 DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS = 0xFFFFFFF7,
1069 DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID = 0xFFFFFFF8,
1070 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN = 0xFFFFFFF9,
1071 DRSUAPI_DS_NAME_FORMAT_LIST_ROLES = 0xFFFFFFFA,
1072 DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER = 0xFFFFFFFB,
1073 DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE = 0xFFFFFFFC,
1074 DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE = 0xFFFFFFFD,
1075 DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE = 0xFFFFFFFE,
1076 DRSUAPI_DS_NAME_FORMAT_LIST_SITES = 0xFFFFFFFF
1077 } drsuapi_DsNameFormat;
1079 typedef struct {
1080 [string,charset(UTF16)] uint16 *str;
1081 } drsuapi_DsNameString;
1083 typedef struct {
1084 uint32 codepage; /* 0x000004e4 - 1252 is german codepage*/
1085 uint32 language; /* 0x00000407 - german language ID*/
1086 drsuapi_DsNameFlags format_flags;
1087 drsuapi_DsNameFormat format_offered;
1088 drsuapi_DsNameFormat format_desired;
1089 [range(1,10000)] uint32 count;
1090 [size_is(count)] drsuapi_DsNameString *names;
1091 } drsuapi_DsNameRequest1;
1093 typedef [switch_type(uint32)] union {
1094 [case(1)] drsuapi_DsNameRequest1 req1;
1095 } drsuapi_DsNameRequest;
1097 typedef struct {
1098 drsuapi_DsNameStatus status;
1099 [charset(UTF16),string] uint16 *dns_domain_name;
1100 [charset(UTF16),string] uint16 *result_name;
1101 } drsuapi_DsNameInfo1;
1103 typedef struct {
1104 uint32 count;
1105 [size_is(count)] drsuapi_DsNameInfo1 *array;
1106 } drsuapi_DsNameCtr1;
1108 typedef [switch_type(uint32)] union {
1109 [case(1)] drsuapi_DsNameCtr1 *ctr1;
1110 } drsuapi_DsNameCtr;
1112 WERROR drsuapi_DsCrackNames(
1113 [in] policy_handle *bind_handle,
1114 [in] uint32 level,
1115 [in,ref,switch_is(level)] drsuapi_DsNameRequest *req,
1116 [out,ref] uint32 *level_out,
1117 [out,ref,switch_is(*level_out)] drsuapi_DsNameCtr *ctr
1120 /*****************/
1121 /* Function 0x0d */
1122 typedef [v1_enum] enum {
1123 DRSUAPI_DS_SPN_OPERATION_ADD = 0,
1124 DRSUAPI_DS_SPN_OPERATION_REPLACE= 1,
1125 DRSUAPI_DS_SPN_OPERATION_DELETE = 2
1126 } drsuapi_DsSpnOperation;
1128 typedef struct {
1129 drsuapi_DsSpnOperation operation;
1130 uint32 unknown1;
1131 [charset(UTF16),string] uint16 *object_dn;
1132 [range(0,10000)] uint32 count;
1133 [size_is(count)] drsuapi_DsNameString *spn_names;
1134 } drsuapi_DsWriteAccountSpnRequest1;
1136 typedef [switch_type(uint32)] union {
1137 [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1;
1138 } drsuapi_DsWriteAccountSpnRequest;
1140 typedef struct {
1141 WERROR status;
1142 } drsuapi_DsWriteAccountSpnResult1;
1144 typedef [switch_type(uint32)] union {
1145 [case(1)] drsuapi_DsWriteAccountSpnResult1 res1;
1146 } drsuapi_DsWriteAccountSpnResult;
1148 WERROR drsuapi_DsWriteAccountSpn(
1149 [in] policy_handle *bind_handle,
1150 [in] uint32 level,
1151 [in,ref,switch_is(level)] drsuapi_DsWriteAccountSpnRequest *req,
1152 [out,ref] uint32 *level_out,
1153 [out,ref,switch_is(*level_out)] drsuapi_DsWriteAccountSpnResult *res
1156 /*****************/
1157 /* Function 0x0e */
1158 typedef struct {
1159 [charset(UTF16),string] uint16 *server_dn;
1160 [charset(UTF16),string] uint16 *domain_dn;
1161 boolean32 commit;
1162 } drsuapi_DsRemoveDSServerRequest1;
1164 typedef [switch_type(uint32)] union {
1165 [case(1)] drsuapi_DsRemoveDSServerRequest1 req1;
1166 } drsuapi_DsRemoveDSServerRequest;
1168 typedef struct {
1169 boolean32 last_dc_in_domain;
1170 } drsuapi_DsRemoveDSServerResult1;
1172 typedef [switch_type(uint32)] union {
1173 [case(1)] drsuapi_DsRemoveDSServerResult1 res1;
1174 } drsuapi_DsRemoveDSServerResult;
1176 WERROR drsuapi_DsRemoveDSServer(
1177 [in] policy_handle *bind_handle,
1178 [in] uint32 level,
1179 [in,ref,switch_is(level)] drsuapi_DsRemoveDSServerRequest *req,
1180 [out,ref] uint32 *level_out,
1181 [out,ref,switch_is(*level_out)] drsuapi_DsRemoveDSServerResult *res
1184 /*****************/
1185 /* Function 0x0f */
1186 [todo] WERROR DRSUAPI_REMOVE_DS_DOMAIN();
1188 /*****************/
1189 /* Function 0x10 */
1190 typedef [v1_enum] enum {
1191 DRSUAPI_DC_INFO_CTR_1 = 1,
1192 DRSUAPI_DC_INFO_CTR_2 = 2,
1193 DRSUAPI_DC_INFO_CTR_3 = 3,
1194 DRSUAPI_DC_CONNECTION_CTR_01 = 0xFFFFFFFF
1195 } drsuapi_DsGetDCInfoCtrLevels;
1197 typedef struct {
1198 [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
1199 drsuapi_DsGetDCInfoCtrLevels level; /* specifies the switch level for the request */
1200 } drsuapi_DsGetDCInfoRequest1;
1202 typedef [switch_type(uint32)] union {
1203 [case(1)] drsuapi_DsGetDCInfoRequest1 req1;
1204 } drsuapi_DsGetDCInfoRequest;
1206 typedef struct {
1207 [charset(UTF16),string] uint16 *netbios_name;
1208 [charset(UTF16),string] uint16 *dns_name;
1209 [charset(UTF16),string] uint16 *site_name;
1210 [charset(UTF16),string] uint16 *computer_dn;
1211 [charset(UTF16),string] uint16 *server_dn;
1212 uint32 is_pdc;
1213 uint32 is_enabled;
1214 } drsuapi_DsGetDCInfo1;
1216 typedef struct {
1217 [range(0,10000)] uint32 count;
1218 [size_is(count)] drsuapi_DsGetDCInfo1 *array;
1219 } drsuapi_DsGetDCInfoCtr1;
1221 typedef struct {
1222 [charset(UTF16),string] uint16 *netbios_name;
1223 [charset(UTF16),string] uint16 *dns_name;
1224 [charset(UTF16),string] uint16 *site_name;
1225 [charset(UTF16),string] uint16 *site_dn;
1226 [charset(UTF16),string] uint16 *computer_dn;
1227 [charset(UTF16),string] uint16 *server_dn;
1228 [charset(UTF16),string] uint16 *ntds_dn;
1229 uint32 is_pdc;
1230 uint32 is_enabled;
1231 uint32 is_gc;
1232 GUID site_guid;
1233 GUID computer_guid;
1234 GUID server_guid;
1235 GUID ntds_guid;
1236 } drsuapi_DsGetDCInfo2;
1238 typedef struct {
1239 [range(0,10000)] uint32 count;
1240 [size_is(count)] drsuapi_DsGetDCInfo2 *array;
1241 } drsuapi_DsGetDCInfoCtr2;
1243 typedef struct {
1244 [charset(UTF16),string] uint16 *netbios_name;
1245 [charset(UTF16),string] uint16 *dns_name;
1246 [charset(UTF16),string] uint16 *site_name;
1247 [charset(UTF16),string] uint16 *site_dn;
1248 [charset(UTF16),string] uint16 *computer_dn;
1249 [charset(UTF16),string] uint16 *server_dn;
1250 [charset(UTF16),string] uint16 *ntds_dn;
1251 uint32 is_pdc;
1252 uint32 is_enabled;
1253 uint32 is_gc;
1254 uint32 is_rodc;
1255 GUID site_guid;
1256 GUID computer_guid;
1257 GUID server_guid;
1258 GUID ntds_guid;
1259 } drsuapi_DsGetDCInfo3;
1261 typedef struct {
1262 [range(0,10000)] uint32 count;
1263 [size_is(count)] drsuapi_DsGetDCInfo3 *array;
1264 } drsuapi_DsGetDCInfoCtr3;
1267 * this represents an active connection to the
1268 * Directory System Agent (DSA)
1269 * this can be via LDAP or DRSUAPI
1271 typedef struct {
1272 [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
1273 uint32 unknown2;
1274 uint32 connection_time; /* in seconds */
1275 uint32 unknown4;
1276 uint32 unknown5;
1277 uint32 unknown6;
1279 * client_account can be the following:
1280 * "W2K3\Administrator"
1281 * "Administrator@W2K3"
1282 * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
1283 * ""
1284 * or NULL
1286 [charset(UTF16),string] uint16 *client_account;
1287 } drsuapi_DsGetDCConnection01;
1289 typedef struct {
1290 [range(0,10000)] uint32 count;
1291 [size_is(count)] drsuapi_DsGetDCConnection01 *array;
1292 } drsuapi_DsGetDCConnectionCtr01;
1294 typedef [switch_type(drsuapi_DsGetDCInfoCtrLevels)] union {
1295 [case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1;
1296 [case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2;
1297 [case(DRSUAPI_DC_INFO_CTR_3)] drsuapi_DsGetDCInfoCtr3 ctr3;
1298 [case(DRSUAPI_DC_CONNECTION_CTR_01)] drsuapi_DsGetDCConnectionCtr01 ctr01;
1299 } drsuapi_DsGetDCInfoCtr;
1301 WERROR drsuapi_DsGetDomainControllerInfo(
1302 [in] policy_handle *bind_handle,
1303 [in] uint32 level,
1304 [in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req,
1305 [out,ref] drsuapi_DsGetDCInfoCtrLevels *level_out,
1306 [out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr
1309 /*****************/
1310 /* Function 0x11 */
1311 typedef [public,noprint] struct {
1312 [max_recursion(20000)]
1313 drsuapi_DsReplicaObjectListItem *next_object;
1314 drsuapi_DsReplicaObject object;
1315 } drsuapi_DsReplicaObjectListItem;
1318 * The DsAddEntry() call which creates a nTDSDSA object,
1319 * also adds a servicePrincipalName in the following form
1320 * to the computer account of the new domain controller
1321 * referenced by the "serverReferenece" attribute.
1323 * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
1325 * also note that the "serverReference" isn't added to the new object!
1327 const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
1329 /* Error codes to classify an error that occurs
1330 * during a search for, or the update of,
1331 * a directory object */
1332 typedef [v1_enum] enum {
1333 DRSUAPI_DIRERR_OK = 0,
1334 DRSUAPI_DIRERR_ATTRIBUTE = 1,
1335 DRSUAPI_DIRERR_NAME = 2,
1336 DRSUAPI_DIRERR_REFERRAL = 3,
1337 DRSUAPI_DIRERR_SECURITY = 4,
1338 DRSUAPI_DIRERR_SERVICE = 5,
1339 DRSUAPI_DIRERR_UPDATE = 6,
1340 DRSUAPI_DIRERR_SYSTEM = 7
1341 } drsuapi_DsAddEntry_DirErr;
1344 * Ref: DRS_MSG_ADDENTRYREQ_V2, [MS-DRSR]: 4.1.1.1.3
1346 typedef struct {
1347 drsuapi_DsReplicaObjectListItem first_object;
1348 } drsuapi_DsAddEntryRequest2;
1350 /* Buffer type is actually more
1351 * like a semi Flags
1352 * Ref: DRS_SecBuffer, [MS-DRSR]: 5.41 */
1353 typedef [v1_enum,noprint] enum {
1354 DRSUAPI_SECBUFFER_EMPTY = 0x00000000,
1355 DRSUAPI_SECBUFFER_DATA = 0x00000001,
1356 DRSUAPI_SECBUFFER_TOKEN = 0x00000002,
1357 DRSUAPI_SECBUFFER_PKG_PARAMS = 0x00000003,
1358 DRSUAPI_SECBUFFER_MISSING = 0x00000004,
1359 DRSUAPI_SECBUFFER_EXTRA = 0x00000005,
1360 DRSUAPI_SECBUFFER_STREAM_TRAILER = 0x00000006,
1361 DRSUAPI_SECBUFFER_STREAM_HEADER = 0x00000007,
1362 DRSUAPI_SECBUFFER_READONLY = 0x80000000
1363 } drsuapi_SecBufferType;
1365 typedef struct {
1366 [range(0,10000)] uint32 buf_size;
1367 drsuapi_SecBufferType buf_type;
1368 [size_is(buf_size)] uint8 *buffer;
1369 } drsuapi_SecBuffer;
1371 typedef struct {
1372 [value(0)] uint32 version;
1373 [range(0,10000)] uint32 buff_count;
1374 [size_is(buff_count)] drsuapi_SecBuffer *buffers;
1375 } drsuapi_SecBufferDesc;
1378 * Ref: DRS_MSG_ADDENTRYREQ_V3, [MS-DRSR]: 4.1.1.1.4
1380 typedef struct {
1381 drsuapi_DsReplicaObjectListItem first_object;
1382 drsuapi_SecBufferDesc *client_creds;
1383 } drsuapi_DsAddEntryRequest3;
1385 typedef [switch_type(uint32)] union {
1386 [case(2)] drsuapi_DsAddEntryRequest2 req2;
1387 [case(3)] drsuapi_DsAddEntryRequest3 req3;
1388 } drsuapi_DsAddEntryRequest;
1390 /* Generic extended error info
1391 * commonly used in most places
1392 * where rich error info is returned */
1393 typedef struct {
1394 uint32 dsid; /* implementation-specific diagnostic code */
1395 WERROR extended_err; /* 0, STATUS code, or Windows error code */
1396 uint32 extended_data; /* implementation-specific diagnostic code */
1397 uint16 problem; /* 0 or PROBLEM error code */
1398 } drsuapi_DsAddEntryErrorInfoX;
1400 /* Attribute errors
1401 * Ref: ATRERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.11 */
1402 typedef struct {
1403 uint32 dsid;
1404 WERROR extended_err;
1405 uint32 extended_data;
1406 uint16 problem;
1407 drsuapi_DsAttributeId attid;
1408 boolean32 is_val_returned;
1409 drsuapi_DsAttributeValue attr_val;
1410 } drsuapi_DsAddEntry_AttrErr_V1;
1412 typedef [noprint] struct {
1413 [max_recursion(20000)]
1414 drsuapi_DsAddEntry_AttrErrListItem_V1 *next;
1415 drsuapi_DsAddEntry_AttrErr_V1 err_data;
1416 } drsuapi_DsAddEntry_AttrErrListItem_V1;
1418 typedef struct {
1419 drsuapi_DsReplicaObjectIdentifier *id;
1420 uint32 count;
1421 drsuapi_DsAddEntry_AttrErrListItem_V1 first;
1422 } drsuapi_DsAddEntryErrorInfo_Attr_V1;
1424 /* Name resolution error
1425 * Ref: NAMERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.14 */
1426 typedef struct {
1427 uint32 dsid;
1428 WERROR extended_err;
1429 uint32 extended_data;
1430 uint16 problem;
1431 drsuapi_DsReplicaObjectIdentifier *id_matched; /* The best match for the supplied object identity */
1432 } drsuapi_DsAddEntryErrorInfo_Name_V1;
1434 /* Referral error
1435 * Ref: REFERR_DRS_WIRE_V1, [MS-DRSR]: 4.1.1.1.15 */
1436 typedef struct {
1437 [value(83)] uint8 name_res; /* Must be 'S' */
1438 [value(0)] uint8 unused_pad;
1439 [value(0)] uint16 next_rdn;
1440 } drsuapi_NameResOp_V1;
1442 typedef [enum16bit] enum {
1443 DRSUAPI_CH_REFTYPE_SUPERIOR = 0x0000, /* referral to a superior DC */
1444 DRSUAPI_CH_REFTYPE_SUBORDINATE = 0x0001, /* referral to a subordinate DC */
1445 DRSUAPI_CH_REFTYPE_NSSR = 0x0002, /* Not used */
1446 DRSUAPI_CH_REFTYPE_CROSS = 0x0003 /* A referral to an external crossRef object */
1447 } drsuapi_DsAddEntry_RefType;
1449 typedef [enum8bit] enum {
1450 DRSUAPI_SE_CHOICE_BASE_ONLY = 0x00,
1451 DRSUAPI_SE_CHOICE_IMMED_CHLDRN = 0x01,
1452 DRSUAPI_SE_CHOICE_WHOLE_SUBTREE = 0x02
1453 } drsuapi_DsAddEntry_ChoiceType;
1455 /* list of network names of the DCs
1456 * to which the referral is directed */
1457 typedef struct {
1458 [max_recursion(1024)] drsuapi_DsaAddressListItem_V1 *next;
1459 lsa_String *address;
1460 } drsuapi_DsaAddressListItem_V1;
1462 typedef struct {
1463 drsuapi_DsReplicaObjectIdentifier *id_target; /* object to which the referral is directed */
1464 drsuapi_NameResOp_V1 op_state;
1465 [value(0)] uint16 rdn_alias;
1466 [value(0)] uint16 rdn_internal;
1467 drsuapi_DsAddEntry_RefType ref_type;
1468 uint16 addr_list_count;
1469 drsuapi_DsaAddressListItem_V1 *addr_list;
1470 [max_recursion(20000)]
1471 drsuapi_DsAddEntry_RefErrListItem_V1 *next;
1472 boolean32 is_choice_set;
1473 drsuapi_DsAddEntry_ChoiceType choice;
1474 } drsuapi_DsAddEntry_RefErrListItem_V1;
1476 typedef struct {
1477 uint32 dsid;
1478 WERROR extended_err;
1479 uint32 extended_data;
1480 drsuapi_DsAddEntry_RefErrListItem_V1 refer;
1481 } drsuapi_DsAddEntryErrorInfo_Referr_V1;
1483 typedef [switch_type(uint32)] union {
1484 [case(1)] drsuapi_DsAddEntryErrorInfo_Attr_V1 attr_err;
1485 [case(2)] drsuapi_DsAddEntryErrorInfo_Name_V1 name_err;
1486 [case(3)] drsuapi_DsAddEntryErrorInfo_Referr_V1 referral_err;
1487 [case(4)] drsuapi_DsAddEntryErrorInfoX security_err;
1488 [case(5)] drsuapi_DsAddEntryErrorInfoX service_err;
1489 [case(6)] drsuapi_DsAddEntryErrorInfoX update_err;
1490 [case(7)] drsuapi_DsAddEntryErrorInfoX system_err;
1491 } drsuapi_DsAddEntryErrorInfo;
1493 typedef struct {
1494 WERROR status;
1495 drsuapi_DsAddEntry_DirErr dir_err;
1496 [switch_is(dir_err)] drsuapi_DsAddEntryErrorInfo *info;
1497 } drsuapi_DsAddEntry_ErrData_V1;
1499 typedef [switch_type(uint32)] union {
1500 [case(1)] drsuapi_DsAddEntry_ErrData_V1 v1;
1501 } drsuapi_DsAddEntry_ErrData;
1503 typedef struct {
1504 GUID guid;
1505 dom_sid28 sid;
1506 } drsuapi_DsReplicaObjectIdentifier2;
1508 typedef struct {
1509 drsuapi_DsReplicaObjectIdentifier *id;
1510 drsuapi_DsAddEntry_DirErr dir_err;
1511 uint32 dsid; /* implementation-specific diagnostic code */
1512 WERROR extended_err; /* 0, STATUS code, or Windows error code */
1513 uint32 extended_data; /* implementation-specific diagnostic code */
1514 uint16 problem; /* 0 or PROBLEM error code */
1515 [range(0,10000)] uint32 count;
1516 [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
1517 } drsuapi_DsAddEntryCtr2;
1519 typedef struct {
1520 drsuapi_DsReplicaObjectIdentifier *id;
1521 uint32 err_ver; /* Must be 1 */
1522 [switch_is(err_ver)] drsuapi_DsAddEntry_ErrData *err_data;
1523 [range(0,10000)] uint32 count;
1524 [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
1525 } drsuapi_DsAddEntryCtr3;
1527 typedef [switch_type(uint32)] union {
1528 [case(2)] drsuapi_DsAddEntryCtr2 ctr2;
1529 [case(3)] drsuapi_DsAddEntryCtr3 ctr3;
1530 } drsuapi_DsAddEntryCtr;
1532 [public] WERROR drsuapi_DsAddEntry(
1533 [in] policy_handle *bind_handle,
1534 [in] uint32 level,
1535 [in,ref,switch_is(level)] drsuapi_DsAddEntryRequest *req,
1536 [out,ref] uint32 *level_out,
1537 [out,ref,switch_is(*level_out)] drsuapi_DsAddEntryCtr *ctr
1540 /*****************/
1541 /* Function 0x12 */
1542 typedef bitmap {
1543 DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION = 0x00000001,
1544 DRSUAPI_DS_EXECUTE_KCC_DAMPED = 0x00000002
1545 } drsuapi_DsExecuteKCCFlags;
1547 typedef struct {
1548 uint32 taskID;
1549 drsuapi_DsExecuteKCCFlags flags;
1550 } drsuapi_DsExecuteKCC1;
1552 typedef [switch_type(uint32)] union {
1553 [case(1)] drsuapi_DsExecuteKCC1 ctr1;
1554 } drsuapi_DsExecuteKCCRequest;
1556 WERROR drsuapi_DsExecuteKCC(
1557 [in] policy_handle *bind_handle,
1558 [in] uint32 level,
1559 [in, ref, switch_is(level)] drsuapi_DsExecuteKCCRequest *req
1562 /*****************/
1563 /* Function 0x13 */
1564 typedef [v1_enum] enum {
1565 DRSUAPI_DS_REPLICA_GET_INFO = 1,
1566 DRSUAPI_DS_REPLICA_GET_INFO2 = 2
1567 } drsuapi_DsReplicaGetInfoLevel;
1569 typedef [v1_enum] enum {
1570 DRSUAPI_DS_REPLICA_INFO_NEIGHBORS = 0,
1571 DRSUAPI_DS_REPLICA_INFO_CURSORS = 1,
1572 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA = 2,
1573 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES = 3,
1574 DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES = 4,
1575 DRSUAPI_DS_REPLICA_INFO_PENDING_OPS = 5,
1576 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA = 6,
1577 DRSUAPI_DS_REPLICA_INFO_CURSORS2 = 7,
1578 DRSUAPI_DS_REPLICA_INFO_CURSORS3 = 8,
1579 DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2 = 9,
1580 DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2 = 10,
1581 DRSUAPI_DS_REPLICA_INFO_REPSTO = -2,
1582 DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS = -4,
1583 DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1 = -5,
1584 DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS = -6
1585 } drsuapi_DsReplicaInfoType;
1587 typedef struct {
1588 drsuapi_DsReplicaInfoType info_type;
1589 [charset(UTF16),string] uint16 *object_dn;
1590 GUID source_dsa_guid;
1591 } drsuapi_DsReplicaGetInfoRequest1;
1593 typedef struct {
1594 drsuapi_DsReplicaInfoType info_type;
1595 [charset(UTF16),string] uint16 *object_dn;
1596 GUID source_dsa_guid;
1597 uint32 flags;
1598 [charset(UTF16),string] uint16 *attribute_name;
1599 [charset(UTF16),string] uint16 *value_dn_str;
1600 uint32 enumeration_context;
1601 } drsuapi_DsReplicaGetInfoRequest2;
1603 typedef [switch_type(drsuapi_DsReplicaGetInfoLevel)] union {
1604 [case(DRSUAPI_DS_REPLICA_GET_INFO)] drsuapi_DsReplicaGetInfoRequest1 req1;
1605 [case(DRSUAPI_DS_REPLICA_GET_INFO2)] drsuapi_DsReplicaGetInfoRequest2 req2;
1606 } drsuapi_DsReplicaGetInfoRequest;
1608 typedef struct {
1609 [charset(UTF16),string] uint16 *naming_context_dn;
1610 [charset(UTF16),string] uint16 *source_dsa_obj_dn;
1611 [charset(UTF16),string] uint16 *source_dsa_address;
1612 [charset(UTF16),string] uint16 *transport_obj_dn;
1613 drsuapi_DrsOptions replica_flags;
1614 uint32 reserved;
1615 GUID naming_context_obj_guid;
1616 GUID source_dsa_obj_guid;
1617 GUID source_dsa_invocation_id;
1618 GUID transport_obj_guid;
1619 hyper tmp_highest_usn;
1620 hyper highest_usn;
1621 NTTIME last_success;
1622 NTTIME last_attempt;
1623 WERROR result_last_attempt;
1624 uint32 consecutive_sync_failures;
1625 } drsuapi_DsReplicaNeighbour;
1627 typedef struct {
1628 uint32 count;
1629 uint32 reserved;
1630 [size_is(count)] drsuapi_DsReplicaNeighbour array[];
1631 } drsuapi_DsReplicaNeighbourCtr;
1633 typedef struct {
1634 uint32 count;
1635 uint32 reserved;
1636 [size_is(count)] drsuapi_DsReplicaCursor array[];
1637 } drsuapi_DsReplicaCursorCtr;
1639 typedef struct {
1640 [charset(UTF16),string] uint16 *attribute_name;
1641 uint32 version;
1642 NTTIME originating_change_time;
1643 GUID originating_invocation_id;
1644 hyper originating_usn;
1645 hyper local_usn;
1646 } drsuapi_DsReplicaObjMetaData;
1648 typedef struct {
1649 uint32 count;
1650 uint32 reserved;
1651 [size_is(count)] drsuapi_DsReplicaObjMetaData array[];
1652 } drsuapi_DsReplicaObjMetaDataCtr;
1654 typedef struct {
1655 [charset(UTF16),string] uint16 *dsa_obj_dn;
1656 GUID dsa_obj_guid;
1657 NTTIME first_failure;
1658 uint32 num_failures;
1659 WERROR last_result;
1660 } drsuapi_DsReplicaKccDsaFailure;
1662 typedef struct {
1663 uint32 count;
1664 uint32 reserved;
1665 [size_is(count)] drsuapi_DsReplicaKccDsaFailure array[];
1666 } drsuapi_DsReplicaKccDsaFailuresCtr;
1668 typedef enum {
1669 DRSUAPI_DS_REPLICA_OP_TYPE_SYNC = 0,
1670 DRSUAPI_DS_REPLICA_OP_TYPE_ADD = 1,
1671 DRSUAPI_DS_REPLICA_OP_TYPE_DELETE = 2,
1672 DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY = 3,
1673 DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS = 4
1674 } drsuapi_DsReplicaOpType;
1676 typedef struct {
1677 NTTIME operation_start;
1678 uint32 serial_num; /* unique till reboot */
1679 uint32 priority;
1680 drsuapi_DsReplicaOpType operation_type;
1681 drsuapi_DrsOptions options;
1682 [charset(UTF16),string] uint16 *nc_dn;
1683 [charset(UTF16),string] uint16 *remote_dsa_obj_dn;
1684 [charset(UTF16),string] uint16 *remote_dsa_address;
1685 GUID nc_obj_guid;
1686 GUID remote_dsa_obj_guid;
1687 } drsuapi_DsReplicaOp;
1689 typedef struct {
1690 NTTIME time;
1691 uint32 count;
1692 [size_is(count)] drsuapi_DsReplicaOp array[];
1693 } drsuapi_DsReplicaOpCtr;
1695 typedef struct {
1696 [charset(UTF16),string] uint16 *attribute_name;
1697 [charset(UTF16),string] uint16 *object_dn;
1698 [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
1699 DATA_BLOB *binary;
1700 NTTIME deleted;
1701 NTTIME created;
1702 uint32 version;
1703 NTTIME originating_change_time;
1704 GUID originating_invocation_id;
1705 hyper originating_usn;
1706 hyper local_usn;
1707 } drsuapi_DsReplicaAttrValMetaData;
1709 typedef struct {
1710 uint32 count;
1711 uint32 enumeration_context;
1712 [size_is(count)] drsuapi_DsReplicaAttrValMetaData array[];
1713 } drsuapi_DsReplicaAttrValMetaDataCtr;
1715 typedef struct {
1716 uint32 count;
1717 uint32 enumeration_context;
1718 [size_is(count)] drsuapi_DsReplicaCursor2 array[];
1719 } drsuapi_DsReplicaCursor2Ctr;
1721 typedef struct {
1722 GUID source_dsa_invocation_id;
1723 hyper highest_usn;
1724 NTTIME last_sync_success;
1725 [charset(UTF16),string] uint16 *source_dsa_obj_dn;
1726 } drsuapi_DsReplicaCursor3;
1728 typedef struct {
1729 uint32 count;
1730 uint32 enumeration_context;
1731 [size_is(count)] drsuapi_DsReplicaCursor3 array[];
1732 } drsuapi_DsReplicaCursor3Ctr;
1734 typedef struct {
1735 [charset(UTF16),string] uint16 *attribute_name;
1736 uint32 version;
1737 NTTIME originating_change_time;
1738 GUID originating_invocation_id;
1739 hyper originating_usn;
1740 hyper local_usn;
1741 [charset(UTF16),string] uint16 *originating_dsa_dn;
1742 } drsuapi_DsReplicaObjMetaData2;
1744 typedef struct {
1745 uint32 count;
1746 uint32 enumeration_context;
1747 [size_is(count)] drsuapi_DsReplicaObjMetaData2 array[];
1748 } drsuapi_DsReplicaObjMetaData2Ctr;
1750 typedef struct {
1751 [charset(UTF16),string] uint16 *attribute_name;
1752 [charset(UTF16),string] uint16 *object_dn;
1753 [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
1754 DATA_BLOB *binary;
1755 NTTIME deleted;
1756 NTTIME created;
1757 uint32 version;
1758 NTTIME originating_change_time;
1759 GUID originating_invocation_id;
1760 hyper originating_usn;
1761 hyper local_usn;
1762 [charset(UTF16),string] uint16 *originating_dsa_dn;
1763 } drsuapi_DsReplicaAttrValMetaData2;
1765 typedef struct {
1766 uint32 count;
1767 uint32 enumeration_context;
1768 [size_is(count)] drsuapi_DsReplicaAttrValMetaData2 array[];
1769 } drsuapi_DsReplicaAttrValMetaData2Ctr;
1771 typedef struct {
1772 hyper u1; /* session number? */
1773 uint32 u2;
1774 uint32 u3;
1775 GUID bind_guid;
1776 NTTIME_1sec bind_time;
1777 [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
1778 uint32 u5; /* this is the same value the client used as pid in the DsBindInfoX struct */
1779 } drsuapi_DsReplicaConnection04;
1781 typedef struct {
1782 [range(0,10000)] uint32 count;
1783 uint32 reserved;
1784 [size_is(count)] drsuapi_DsReplicaConnection04 array[];
1785 } drsuapi_DsReplicaConnection04Ctr;
1787 typedef struct {
1788 [charset(UTF16),string] uint16 *str1;
1789 uint32 u1;
1790 uint32 u2;
1791 uint32 u3;
1792 uint32 u4;
1793 uint32 u5;
1794 hyper u6;
1795 uint32 u7;
1796 } drsuapi_DsReplica06;
1798 typedef struct {
1799 [range(0,256)] uint32 count;
1800 uint32 reserved;
1801 [size_is(count)] drsuapi_DsReplica06 array[];
1802 } drsuapi_DsReplica06Ctr;
1804 typedef [switch_type(drsuapi_DsReplicaInfoType)] union {
1805 [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS)] drsuapi_DsReplicaNeighbourCtr *neighbours;
1806 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS)] drsuapi_DsReplicaCursorCtr *cursors;
1807 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA)] drsuapi_DsReplicaObjMetaDataCtr *objmetadata;
1808 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *connectfailures;
1809 [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *linkfailures;
1810 [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS)] drsuapi_DsReplicaOpCtr *pendingops;
1811 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA)] drsuapi_DsReplicaAttrValMetaDataCtr *attrvalmetadata;
1812 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2)] drsuapi_DsReplicaCursor2Ctr *cursors2;
1813 [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3)] drsuapi_DsReplicaCursor3Ctr *cursors3;
1814 [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)] drsuapi_DsReplicaObjMetaData2Ctr *objmetadata2;
1815 [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)] drsuapi_DsReplicaAttrValMetaData2Ctr *attrvalmetadata2;
1816 [case(DRSUAPI_DS_REPLICA_INFO_REPSTO)] drsuapi_DsReplicaNeighbourCtr *repsto;
1817 [case(DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS)] drsuapi_DsReplicaConnection04Ctr *clientctx;
1818 [case(DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1)] drsuapi_DsReplicaCursorCtrEx *udv1;
1819 [case(DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS)] drsuapi_DsReplica06Ctr *srvoutgoingcalls;
1820 } drsuapi_DsReplicaInfo;
1822 WERROR drsuapi_DsReplicaGetInfo(
1823 [in] policy_handle *bind_handle,
1824 [in] drsuapi_DsReplicaGetInfoLevel level,
1825 [in,ref,switch_is(level)] drsuapi_DsReplicaGetInfoRequest *req,
1826 [out,ref] drsuapi_DsReplicaInfoType *info_type,
1827 [out,ref,switch_is(*info_type)] drsuapi_DsReplicaInfo *info
1830 /*****************/
1831 /* Function 0x14 */
1832 [todo] WERROR DRSUAPI_ADD_SID_HISTORY();
1834 /*****************/
1835 /* Function 0x15 */
1837 typedef struct {
1838 [range(0,10000)] uint32 num_entries;
1839 [size_is(num_entries)] drsuapi_DsGetMembershipsCtr1 **ctrl_array;
1840 } drsuapi_DsGetMemberships2Ctr1;
1842 typedef [switch_type(uint32)] union {
1843 [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
1844 } drsuapi_DsGetMemberships2Ctr;
1846 typedef struct {
1847 [range(1,10000)] uint32 num_req;
1848 [size_is(num_req)] drsuapi_DsGetMembershipsRequest1 **req_array;
1849 } drsuapi_DsGetMemberships2Request1;
1851 typedef [switch_type(uint32)] union {
1852 [case(1)] drsuapi_DsGetMemberships2Request1 req1;
1853 } drsuapi_DsGetMemberships2Request;
1855 WERROR drsuapi_DsGetMemberships2(
1856 [in] policy_handle *bind_handle,
1857 [in] uint32 level,
1858 [in,ref] [switch_is(level)] drsuapi_DsGetMemberships2Request *req,
1859 [out,ref] uint32 *level_out,
1860 [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
1863 /*****************/
1864 /* Function 0x16 */
1865 [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
1867 /*****************/
1868 /* Function 0x17 */
1869 [todo] WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
1871 /*****************/
1872 /* Function 0x18 */
1873 typedef struct {
1874 WERROR error_code;
1875 uint32 site_cost;
1876 } drsuapi_DsSiteCostInfo;
1878 typedef struct {
1879 [range(0,10000)] uint32 num_info;
1880 [size_is(num_info)] drsuapi_DsSiteCostInfo *info;
1881 [value(0)] uint32 flags_reserved;
1882 } drsuapi_QuerySitesByCostCtr1;
1884 typedef [switch_type(uint32)] union {
1885 [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1;
1886 } drsuapi_QuerySitesByCostCtr;
1888 typedef struct {
1889 [charset(UTF16),string] uint16 *site_from;
1890 [range(1,10000)] uint32 num_req;
1891 [size_is(num_req)] [charset(UTF16),string] uint16 **site_to;
1892 uint32 flags;
1893 } drsuapi_QuerySitesByCostRequest1;
1895 typedef [switch_type(uint32)] union {
1896 [case(1)] drsuapi_QuerySitesByCostRequest1 req1;
1897 } drsuapi_QuerySitesByCostRequest;
1899 WERROR drsuapi_QuerySitesByCost(
1900 [in] policy_handle *bind_handle,
1901 [in] uint32 level,
1902 [in,ref] [switch_is(level)] drsuapi_QuerySitesByCostRequest *req,
1903 [out,ref] uint32 *level_out,
1904 [out,ref] [switch_is(*level_out)] drsuapi_QuerySitesByCostCtr *ctr