6 uuid("12345778-1234-abcd-0001-00000001"),
8 pointer_default(unique),
9 helpstring("Active Directory Replication LDAP Blobs")
12 declare bitmap drsuapi_DsReplicaSyncOptions;
13 declare bitmap drsuapi_DsReplicaNeighbourFlags;
14 declare [v1_enum] enum drsuapi_DsAttributeId;
17 * replPropertyMetaData
22 drsuapi_DsAttributeId attid;
24 NTTIME_1sec orginating_time;
25 GUID orginating_invocation_id;
28 } replPropertyMetaData1;
33 replPropertyMetaData1 array[count];
34 } replPropertyMetaDataCtr1;
36 typedef [nodiscriminant] union {
37 [case(1)] replPropertyMetaDataCtr1 ctr1;
38 } replPropertyMetaDataCtr;
40 typedef [public] struct {
43 [switch_is(version)] replPropertyMetaDataCtr ctr;
44 } replPropertyMetaDataBlob;
46 void decode_replPropertyMetaData(
47 [in] replPropertyMetaDataBlob blob
58 drsuapi_DsReplicaCursor cursors[count];
59 } replUpToDateVectorCtr1;
64 drsuapi_DsReplicaCursor2 cursors[count];
65 } replUpToDateVectorCtr2;
67 typedef [nodiscriminant] union {
68 [case(1)] replUpToDateVectorCtr1 ctr1;
69 [case(2)] replUpToDateVectorCtr2 ctr2;
70 } replUpToDateVectorCtr;
72 typedef [public] struct {
75 [switch_is(version)] replUpToDateVectorCtr ctr;
76 } replUpToDateVectorBlob;
78 void decode_replUpToDateVector(
79 [in] replUpToDateVectorBlob blob
87 typedef [public,gensize] struct {
89 } repsFromTo1OtherInfo;
91 typedef [public,gensize,flag(NDR_PAHEX)] struct {
92 /* this includes the 8 bytes of the repsFromToBlob header */
93 [value(ndr_size_repsFromTo1(r, ndr->flags)+8)] uint32 blobsize;
94 uint32 consecutive_sync_failures;
95 NTTIME_1sec last_success;
96 NTTIME_1sec last_attempt;
97 WERROR result_last_attempt;
98 [relative] repsFromTo1OtherInfo *other_info;
99 [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
100 drsuapi_DsReplicaNeighbourFlags replica_flags;
103 drsuapi_DsReplicaHighWaterMark highwatermark;
104 GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
105 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
109 typedef [nodiscriminant] union {
110 [case(1)] repsFromTo1 ctr1;
113 typedef [public] struct {
116 [switch_is(version)] repsFromTo ctr;
119 void decode_repsFromTo(
120 [in] repsFromToBlob blob
124 * partialAttributeSet
126 * w2k3 uses version 1
130 drsuapi_DsAttributeId array[count];
131 } partialAttributeSetCtr1;
133 typedef [nodiscriminant] union {
134 [case(1)] partialAttributeSetCtr1 ctr1;
135 } partialAttributeSetCtr;
137 typedef [public] struct {
140 [switch_is(version)] partialAttributeSetCtr ctr;
141 } partialAttributeSetBlob;
143 void decode_partialAttributeSet(
144 [in] partialAttributeSetBlob blob
151 * samba4 uses 0x44544442 'DSDB'
153 * as we windows don't return the prefixMap attribute when you ask for
154 * we don't know the format, but the attribute is not replicated
155 * so that we can choose our own format...
157 typedef [v1_enum] enum {
158 PREFIX_MAP_VERSION_DSDB = 0x44544442
161 typedef [nodiscriminant] union {
162 [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
165 typedef [public] struct {
166 prefixMapVersion version;
168 [switch_is(version)] prefixMapCtr ctr;
171 void decode_prefixMap(
172 [in] prefixMapBlob blob
176 * the cookie for the LDAP dirsync control
178 typedef [nodiscriminant,gensize] union {
180 [default] replUpToDateVectorBlob uptodateness_vector;
181 } ldapControlDirSyncExtra;
184 [value(3)] uint32 u1;
188 [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
190 drsuapi_DsReplicaHighWaterMark highwatermark;
192 [switch_is(extra_length)] ldapControlDirSyncExtra extra;
193 } ldapControlDirSyncBlob;
195 typedef [public,relative_base] struct {
196 [charset(DOS),value("MSDS")] uint8 msds[4];
197 [subcontext(0)] ldapControlDirSyncBlob blob;
198 } ldapControlDirSyncCookie;
200 void decode_ldapControlDirSync(
201 [in] ldapControlDirSyncCookie cookie
207 uint16 unknown1; /* 2 for name = 'Packages', 1 for name = 'Primary:*' */
208 [charset(UTF16)] uint8 name[name_len];
210 * the data field contains data as HEX strings
213 * it seems to contains HEX strings
214 * of GUID's concatenated together.
215 * w2k only has 'Primary:Kerberos'
216 * and there's a 32 byte hex string.
217 * w2k3 also has 'Primary:WDigest'
218 * and there's a 64 byte hex string.
219 * ...but this 'Primary:CLEARTEXT'
220 * also there's a 104 byte hex string
221 * (instead of 3 * (16*2) = 96 ).
223 * 'Primary:Kerberos':
229 * 'Primary:CLEARTEXT':
230 * data contains the cleartext password
231 * as UTF16 string encoded as HEX string
233 [charset(DOS)] uint8 data[data_len];
234 } supplementalCredentialsPackage;
236 /* this are 0x30 (48) whitespaces (0x20) followed by 'P' (0x50) */
237 const string SUPPLEMENTAL_CREDENTIALS_PREFIX = " P";
240 [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x31];
242 supplementalCredentialsPackage packages[num_packages];
243 } supplementalCredentialsSubBlob;
245 typedef [public] struct {
246 [value(0)] uint32 unknown1;
248 [value(0)] uint32 unknown2;
249 [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
250 [value(0)] uint8 unknown3;
251 } supplementalCredentialsBlob;
253 void decode_supplementalCredentials(
254 [in] supplementalCredentialsBlob blob
257 typedef [public] struct {
262 typedef [public] struct {
263 DsCompressedChunk chunks[5];
266 void decode_DsCompressed(
267 [in] DsCompressedBlob blob