drsblobs: remove utf8string2 from ForestTrustData.
[samba.git] / librpc / idl / drsblobs.idl
1 #include "idl_types.h"
2
3 import "drsuapi.idl", "misc.idl", "samr.idl", "lsa.idl", "security.idl";
4
5 [
6   uuid("12345778-1234-abcd-0001-00000001"),
7   version(0.0),
8   pointer_default(unique),
9   helper("../librpc/ndr/ndr_drsblobs.h"),
10   helpstring("Active Directory Replication LDAP Blobs")
11 ]
12 interface drsblobs {
13         typedef bitmap drsuapi_DrsOptions drsuapi_DrsOptions;
14         typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
15         typedef [v1_enum] enum lsa_TrustAuthType lsa_TrustAuthType;
16         /*
17          * replPropertyMetaData
18          * w2k  uses version 1
19          * w2k3 uses version 1
20          */
21         typedef struct {
22                 drsuapi_DsAttributeId attid;
23                 uint32 version;
24                 NTTIME_1sec originating_change_time;
25                 GUID originating_invocation_id;
26                 hyper originating_usn;
27                 hyper local_usn;
28         } replPropertyMetaData1;
29
30         typedef struct {
31                 uint32 count;
32                 [value(0)] uint32 reserved;
33                 replPropertyMetaData1 array[count];
34         } replPropertyMetaDataCtr1;
35
36         typedef [nodiscriminant] union {
37                 [case(1)] replPropertyMetaDataCtr1 ctr1;
38         } replPropertyMetaDataCtr;
39         
40         typedef [public] struct {
41                 uint32 version;
42                 [value(0)] uint32 reserved;
43                 [switch_is(version)] replPropertyMetaDataCtr ctr;
44         } replPropertyMetaDataBlob;
45
46         void decode_replPropertyMetaData(
47                 [in] replPropertyMetaDataBlob blob
48                 );
49
50         /*
51          * replUpToDateVector
52          * w2k  uses version 1
53          * w2k3 uses version 2
54          */
55         typedef struct {
56                 uint32 count;
57                 [value(0)] uint32 reserved;
58                 drsuapi_DsReplicaCursor cursors[count];
59         } replUpToDateVectorCtr1;
60
61         typedef struct {
62                 uint32 count;
63                 [value(0)] uint32 reserved;
64                 drsuapi_DsReplicaCursor2 cursors[count];
65         } replUpToDateVectorCtr2;
66
67         typedef [nodiscriminant] union {
68                 [case(1)] replUpToDateVectorCtr1 ctr1;
69                 [case(2)] replUpToDateVectorCtr2 ctr2;
70         } replUpToDateVectorCtr;
71
72         typedef [public] struct {
73                 uint32 version;
74                 [value(0)] uint32 reserved;
75                 [switch_is(version)] replUpToDateVectorCtr ctr;
76         } replUpToDateVectorBlob;
77
78         void decode_replUpToDateVector(
79                 [in] replUpToDateVectorBlob blob
80                 );
81
82         /*
83          * repsFrom/repsTo
84          * w2k  uses version 1
85          * w2k3 uses version 1
86          * w2k8 uses version 2
87          */
88         typedef [public,gensize] struct {
89                 [value(strlen(dns_name)+1)] uint32 __dns_name_size;
90                 [charset(DOS)] uint8 dns_name[__dns_name_size];
91         } repsFromTo1OtherInfo;
92
93         typedef [public,gensize,flag(NDR_PAHEX)] struct {
94                 /* this includes the 8 bytes of the repsFromToBlob header */
95                 [value(ndr_size_repsFromTo1(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
96                 uint32 consecutive_sync_failures;
97                 NTTIME_1sec last_success;
98                 NTTIME_1sec last_attempt;
99                 WERROR result_last_attempt;
100                 [relative] repsFromTo1OtherInfo *other_info;
101                 [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
102                 drsuapi_DrsOptions replica_flags;
103                 uint8 schedule[84];
104                 [value(0)] uint32 reserved;
105                 drsuapi_DsReplicaHighWaterMark highwatermark;
106                 GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
107                 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
108                 GUID transport_guid;
109         } repsFromTo1;
110
111         typedef [public,relative_base,gensize] struct {
112                 [value(ndr_size_repsFromTo2OtherInfo(this,ndr->iconv_convenience, ndr->flags))]
113                         uint32 __ndr_size;
114                 [relative] nstring *dns_name1;
115                 uint32 unknown1;
116                 [relative] nstring *dns_name2;
117                 hyper unknown2;
118         } repsFromTo2OtherInfo;
119
120         typedef [public,gensize,flag(NDR_PAHEX)] struct {
121                 /* this includes the 8 bytes of the repsFromToBlob header */
122                 [value(ndr_size_repsFromTo2(this, ndr->iconv_convenience, ndr->flags)+8)] uint32 blobsize;
123                 uint32 consecutive_sync_failures;
124                 NTTIME_1sec last_success;
125                 NTTIME_1sec last_attempt;
126                 WERROR result_last_attempt;
127                 [relative] repsFromTo2OtherInfo *other_info;
128                 [value(ndr_size_repsFromTo2OtherInfo(other_info, ndr->iconv_convenience, ndr->flags))] uint32 other_info_length;
129                 drsuapi_DrsOptions replica_flags;
130                 uint8 schedule[84];
131                 [value(0)] uint32 reserved;
132                 drsuapi_DsReplicaHighWaterMark highwatermark;
133                 GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
134                 GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
135                 GUID transport_guid;
136                 hyper unknown1;
137         } repsFromTo2;
138
139         typedef [nodiscriminant] union {
140                 [case(1)] repsFromTo1 ctr1;
141                 [case(2)] repsFromTo2 ctr2;
142         } repsFromTo;
143
144         typedef [public] struct {
145                 uint32 version;
146                 [value(0)] uint32 reserved;
147                 [switch_is(version)] repsFromTo ctr;
148         } repsFromToBlob;
149
150         void decode_repsFromTo(
151                 [in] repsFromToBlob blob
152                 );
153
154         /*
155          * partialAttributeSet
156          * w2k  uses version 1
157          * w2k3 uses version 1
158          */
159         typedef struct {
160                 uint32 count;
161                 drsuapi_DsAttributeId array[count];
162         } partialAttributeSetCtr1;
163
164         typedef [nodiscriminant] union {
165                 [case(1)] partialAttributeSetCtr1 ctr1;
166         } partialAttributeSetCtr;
167
168         typedef [public] struct {
169                 uint32 version;
170                 [value(0)] uint32 reserved;
171                 [switch_is(version)] partialAttributeSetCtr ctr;
172         } partialAttributeSetBlob;
173
174         void decode_partialAttributeSet(
175                 [in] partialAttributeSetBlob blob
176                 );
177
178         /*
179          * MS w2k3 and w2k8 prefixMap format
180          * There is no version number. Format is:
181          *   uint32 - number of entries in the map
182          *   uint32 - total bytes that structure occupies
183          *   ENTRIES:
184          *     uint16 - prefix ID (OID's last sub-id encoded. see prefixMap)
185          *     uint16 - number of bytes in prefix N
186          *     uint8[N] - BER encoded prefix
187          */
188         typedef [noprint,flag(NDR_NOALIGN)] struct {
189                 uint16 entryID;
190                 uint16 length;
191                 uint8 binary_oid[length];
192         } drsuapi_MSPrefixMap_Entry;
193
194         typedef [public,gensize] struct {
195                 uint32 num_entries;
196                 [value(ndr_size_drsuapi_MSPrefixMap_Ctr(r, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
197                 drsuapi_MSPrefixMap_Entry entries[num_entries];
198         } drsuapi_MSPrefixMap_Ctr;
199
200         /*
201          * prefixMap
202          * w2k  unknown
203          * w2k3 unknown
204          * samba4 uses 0x44534442 'DSDB'
205          *
206          * as we windows don't return the prefixMap attribute when you ask for
207          * we don't know the format, but the attribute is not replicated
208          * so that we can choose our own format...
209          */
210         typedef [v1_enum] enum {
211                 PREFIX_MAP_VERSION_DSDB = 0x44534442
212         } prefixMapVersion;
213
214         typedef [nodiscriminant] union {
215                 [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
216         } prefixMapCtr;
217
218         typedef [public] struct {
219                 prefixMapVersion version;
220                 [value(0)] uint32 reserved;
221                 [switch_is(version)] prefixMapCtr ctr;
222         } prefixMapBlob;
223
224         void decode_prefixMap(
225                 [in] prefixMapBlob blob
226                 );
227
228
229         /*
230          * the cookie for the LDAP dirsync control
231          */
232         typedef [nodiscriminant,gensize] union {
233                 [case(0)];
234                 [default] replUpToDateVectorBlob uptodateness_vector;
235         } ldapControlDirSyncExtra;
236
237         typedef struct {
238                 [value(3)] uint32 u1;
239                 NTTIME time;
240                 uint32 u2;
241                 uint32 u3;
242                 [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, ndr->iconv_convenience, 0))] 
243                         uint32 extra_length;
244                 drsuapi_DsReplicaHighWaterMark highwatermark;
245                 GUID guid1;
246                 [switch_is(extra_length)] ldapControlDirSyncExtra extra;
247         } ldapControlDirSyncBlob;
248
249         typedef [public,relative_base] struct {
250                 [charset(DOS),value("MSDS")] uint8 msds[4];
251                 [subcontext(0)] ldapControlDirSyncBlob blob;
252         } ldapControlDirSyncCookie;
253
254         void decode_ldapControlDirSync(
255                 [in] ldapControlDirSyncCookie cookie
256                 );
257
258         typedef struct {
259                 [value(2*strlen_m(name))] uint16 name_len;
260                 [value(strlen(data))] uint16 data_len;
261                 uint16 reserved; /* 2 for 'Packages', 1 for 'Primary:*', but should be ignored */
262                 [charset(UTF16)] uint8 name[name_len];
263                 /* 
264                  * the data field contains data as HEX strings
265                  *
266                  * 'Packages':
267                  *   data contains the list of packages
268                  *   as non termiated UTF16 strings with
269                  *   a UTF16 NULL byte as separator
270                  *
271                  * 'Primary:Kerberos-Newer-Keys':
272                  *    ...
273                  *
274                  * 'Primary:Kerberos':
275                  *    ...
276                  *
277                  * 'Primary:WDigest':
278                  *    ...
279                  *
280                  * 'Primary:CLEARTEXT':
281                  *    data contains the cleartext password
282                  *    as UTF16 string encoded as HEX string
283                  */
284                 [charset(DOS)] uint8 data[data_len];
285         } supplementalCredentialsPackage;
286
287         /* this are 0x30 (48) whitespaces (0x20) */
288         const string SUPPLEMENTAL_CREDENTIALS_PREFIX = "                                                ";
289
290         typedef [flag(NDR_PAHEX)] enum {
291                 SUPPLEMENTAL_CREDENTIALS_SIGNATURE = 0x0050
292         } supplementalCredentialsSignature;
293
294         typedef [gensize] struct {
295                 [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x30];
296                 [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] supplementalCredentialsSignature signature;
297                 uint16 num_packages;
298                 supplementalCredentialsPackage packages[num_packages];
299         } supplementalCredentialsSubBlob;
300
301         typedef [public] struct {
302                 [value(0)] uint32 unknown1;
303                 [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->iconv_convenience, ndr->flags))] uint32 __ndr_size;
304                 [value(0)] uint32 unknown2;
305                 [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
306                 [value(0)] uint8 unknown3;
307         } supplementalCredentialsBlob;
308
309         void decode_supplementalCredentials(
310                 [in] supplementalCredentialsBlob blob
311                 );
312
313         typedef [public] struct {
314                 [flag(STR_NOTERM|NDR_REMAINING)] string_array names;
315         } package_PackagesBlob;
316
317         void decode_Packages(
318                 [in] package_PackagesBlob blob
319                 );
320
321         typedef struct {
322                 [value(2*strlen_m(string))] uint16 length;
323                 [value(2*strlen_m(string))] uint16 size;
324                 [relative,subcontext(0),subcontext_size(size),flag(STR_NOTERM|NDR_REMAINING)] string *string;
325         } package_PrimaryKerberosString;
326
327         typedef struct {
328                 [value(0)] uint16 reserved1;
329                 [value(0)] uint16 reserved2;
330                 [value(0)] uint32 reserved3;
331                 uint32 keytype;
332                 [value((value?value->length:0))] uint32 value_len;
333                 [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
334         } package_PrimaryKerberosKey3;
335
336         typedef struct {
337                 uint16 num_keys;
338                 uint16 num_old_keys;
339                 package_PrimaryKerberosString salt;
340                 package_PrimaryKerberosKey3 keys[num_keys];
341                 package_PrimaryKerberosKey3 old_keys[num_old_keys];
342                 [value(0)] uint32 padding1;
343                 [value(0)] uint32 padding2;
344                 [value(0)] uint32 padding3;
345                 [value(0)] uint32 padding4;
346                 [value(0)] uint32 padding5;
347         } package_PrimaryKerberosCtr3;
348
349         typedef struct {
350                 [value(0)] uint16 reserved1;
351                 [value(0)] uint16 reserved2;
352                 [value(0)] uint32 reserved3;
353                 uint32 iteration_count;
354                 uint32 keytype;
355                 [value((value?value->length:0))] uint32 value_len;
356                 [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
357         } package_PrimaryKerberosKey4;
358
359         typedef struct {
360                 uint16 num_keys;
361                 [value(0)] uint16 num_service_keys;
362                 uint16 num_old_keys;
363                 uint16 num_older_keys;
364                 package_PrimaryKerberosString salt;
365                 uint32 default_iteration_count;
366                 package_PrimaryKerberosKey4 keys[num_keys];
367                 package_PrimaryKerberosKey4 service_keys[num_service_keys];
368                 package_PrimaryKerberosKey4 old_keys[num_old_keys];
369                 package_PrimaryKerberosKey4 older_keys[num_older_keys];
370         } package_PrimaryKerberosCtr4;
371
372         typedef [nodiscriminant] union {
373                 [case(3)] package_PrimaryKerberosCtr3 ctr3;
374                 [case(4)] package_PrimaryKerberosCtr4 ctr4;
375         } package_PrimaryKerberosCtr;
376
377         typedef [public] struct {
378                 uint16 version;
379                 [value(0)] uint16 flags;
380                 [switch_is(version)] package_PrimaryKerberosCtr ctr;
381         } package_PrimaryKerberosBlob;
382
383         void decode_PrimaryKerberos(
384                 [in] package_PrimaryKerberosBlob blob
385                 );
386
387         typedef [public] struct {
388                 [flag(NDR_REMAINING)] DATA_BLOB cleartext;
389         } package_PrimaryCLEARTEXTBlob;
390
391         void decode_PrimaryCLEARTEXT(
392                 [in] package_PrimaryCLEARTEXTBlob blob
393                 );
394
395         typedef [flag(NDR_PAHEX)] struct {
396                 uint8 hash[16];
397         } package_PrimaryWDigestHash;
398
399         typedef [public] struct {
400                 [value(0x31)] uint16 unknown1;
401                 [value(0x01)] uint8  unknown2;
402                 uint8  num_hashes;
403                 [value(0)] uint32 unknown3;
404                 [value(0)] udlong uuknown4;
405                 package_PrimaryWDigestHash hashes[num_hashes];
406         } package_PrimaryWDigestBlob;
407
408         void decode_PrimaryWDigest(
409                 [in] package_PrimaryWDigestBlob blob
410                 );
411
412         typedef struct {
413                 [value(0)] uint32 size;
414         } AuthInfoNone;
415
416         typedef struct {
417                 [value(16)] uint32 size;
418                 samr_Password password;
419         } AuthInfoNT4Owf;
420
421         /* 
422          * the secret value is encoded as UTF16 if it's a string
423          * but depending the AuthType, it might also be krb5 trusts have random bytes here, so converting to UTF16
424          * mayfail...
425          *
426          * TODO: We should try handle the case of a random buffer in all places
427          *       we deal with cleartext passwords from windows
428          *
429          * so we don't use this:
430          *
431          * uint32 value_len;
432          * [charset(UTF16)] uint8 value[value_len];
433          */
434
435         typedef struct {
436                 uint32 size;
437                 uint8 password[size];
438         } AuthInfoClear;
439
440         typedef struct {
441                 [value(4)] uint32 size;
442                  uint32 version;
443         } AuthInfoVersion;
444
445         typedef [nodiscriminant] union {
446                 [case(TRUST_AUTH_TYPE_NONE)] AuthInfoNone none;
447                 [case(TRUST_AUTH_TYPE_NT4OWF)] AuthInfoNT4Owf nt4owf;
448                 [case(TRUST_AUTH_TYPE_CLEAR)] AuthInfoClear clear;
449                 [case(TRUST_AUTH_TYPE_VERSION)] AuthInfoVersion version;
450         } AuthInfo;
451
452         typedef [public] struct {
453                 NTTIME LastUpdateTime;
454                 lsa_TrustAuthType AuthType;
455                 
456                 [switch_is(AuthType)] AuthInfo AuthInfo;
457                 [flag(NDR_ALIGN4)] DATA_BLOB _pad;
458         } AuthenticationInformation;
459
460         typedef [nopull,nopush,noprint] struct {
461                 /* sizeis here is bogus, but this is here just for the structure */
462                 [size_is(1)] AuthenticationInformation array[];
463         } AuthenticationInformationArray;
464
465         /* This is nopull,nopush because we pass count down to the
466          * manual parser of AuthenticationInformationArray */
467         typedef [public,nopull,nopush,noprint,gensize] struct {
468                 uint32 count;
469                 [relative] AuthenticationInformationArray *current;
470                 [relative] AuthenticationInformationArray *previous;
471         } trustAuthInOutBlob;
472
473         void decode_trustAuthInOut(
474                 [in] trustAuthInOutBlob blob
475                 );
476
477         typedef [public,gensize] struct {
478                 uint32 count;
479                 [relative] AuthenticationInformation *current[count];
480         } trustCurrentPasswords;
481
482         typedef [public,nopull] struct {
483                 uint8 confounder[512];
484                 [subcontext(0),subcontext_size(outgoing_size)] trustCurrentPasswords outgoing;
485                 [subcontext(0),subcontext_size(incoming_size)] trustCurrentPasswords incoming;
486                 [value(ndr_size_trustCurrentPasswords(&outgoing, ndr->iconv_convenience, ndr->flags))] uint32 outgoing_size;
487                 [value(ndr_size_trustCurrentPasswords(&incoming, ndr->iconv_convenience, ndr->flags))] uint32 incoming_size;
488         } trustDomainPasswords;
489
490         void decode_trustDomainPasswords(
491                 [in] trustDomainPasswords blob
492                 );
493
494         typedef [public] struct {
495                 uint32 marker;
496                 DATA_BLOB data;
497         } DsCompressedChunk;
498
499         typedef struct {
500                 uint16 __size;
501                 [size_is(__size),charset(DOS)] uint8 *string;
502         } ExtendedErrorAString;
503
504         typedef struct {
505                 uint16 __size;
506                 [size_is(__size),charset(UTF16)] uint16 *string;
507         } ExtendedErrorUString;
508
509         typedef struct {
510                 uint16 length;
511                 [size_is(length)] uint8 *data;
512         } ExtendedErrorBlob;
513
514         typedef enum {
515                 EXTENDED_ERROR_COMPUTER_NAME_PRESENT    = 1,
516                 EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT= 2
517         } ExtendedErrorComputerNamePresent;
518
519         typedef [switch_type(ExtendedErrorComputerNamePresent)] union {
520         [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] ExtendedErrorUString name;
521         [case(EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT)];
522         } ExtendedErrorComputerNameU;
523
524         typedef struct {
525                 ExtendedErrorComputerNamePresent present;
526                 [switch_is(present)] ExtendedErrorComputerNameU n;
527         } ExtendedErrorComputerName;
528
529         typedef enum {
530                 EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING          = 1,
531                 EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING        = 2,
532                 EXTENDED_ERROR_PARAM_TYPE_UINT32                = 3,
533                 EXTENDED_ERROR_PARAM_TYPE_UINT16                = 4,
534                 EXTENDED_ERROR_PARAM_TYPE_UINT64                = 5,
535                 EXTENDED_ERROR_PARAM_TYPE_NONE                  = 6,
536                 EXTENDED_ERROR_PARAM_TYPE_BLOB                  = 7
537         } ExtendedErrorParamType;
538
539         typedef [switch_type(ExtendedErrorParamType)] union {
540         [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] ExtendedErrorAString a_string;
541         [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] ExtendedErrorUString u_string;
542         [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] uint32 uint32;
543         [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] uint16 uint16;
544         [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] hyper uint64;
545         [case(EXTENDED_ERROR_PARAM_TYPE_NONE)];
546         [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] ExtendedErrorBlob blob;
547         } ExtendedErrorParamU;
548
549         typedef struct {
550                 ExtendedErrorParamType type;
551                 [switch_is(type)] ExtendedErrorParamU p;
552         } ExtendedErrorParam;
553
554         typedef [public] struct {
555                 ExtendedErrorInfo *next;
556                 ExtendedErrorComputerName computer_name;
557                 hyper pid;
558                 NTTIME time;
559                 uint32 generating_component;
560                 WERROR status;
561                 uint16 detection_location;
562                 uint16 flags;
563                 uint16 num_params;
564                 [size_is(num_params)] ExtendedErrorParam params[];
565         } ExtendedErrorInfo;
566
567         typedef struct {
568                 [unique] ExtendedErrorInfo *info;
569         } ExtendedErrorInfoPtr;
570
571         void decode_ExtendedErrorInfo (
572                 [in,subcontext(0xFFFFFC01)] ExtendedErrorInfoPtr ptr
573                 );
574
575         /* MS-ADTS 7.1.6.9.3 msDS-TrustForestTrustInfo Attribute */
576
577         typedef struct {
578                 [value(strlen_m(string))] uint32 size;
579                 [charset(UTF8)] uint8 string[size];
580         } ForestTrustString;
581
582         typedef [flag(NDR_NOALIGN)] struct {
583                 [value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
584                 [subcontext(0),subcontext_size(sid_size)] dom_sid sid;
585                 ForestTrustString dns_name;
586                 ForestTrustString netbios_name;
587         } ForestTrustDataDomainInfo;
588
589         typedef [flag(NDR_NOALIGN)] struct {
590                 uint32 size;
591                 uint8 data[size];
592         } ForestTrustDataBinaryData;
593
594         typedef [nodiscriminant] union {
595                 [case(FOREST_TRUST_TOP_LEVEL_NAME)] ForestTrustString name;
596                 [case(FOREST_TRUST_TOP_LEVEL_NAME_EX)] ForestTrustString name;
597                 [case(FOREST_TRUST_DOMAIN_INFO)] ForestTrustDataDomainInfo info;
598                 [default] ForestTrustDataBinaryData data;
599         } ForestTrustData;
600
601         /* same as lsa_ForestTrustRecordType */
602         typedef [enum8bit] enum {
603                 FOREST_TRUST_TOP_LEVEL_NAME = 0,
604                 FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
605                 FOREST_TRUST_DOMAIN_INFO = 2
606         } ForestTrustInfoRecordType;
607
608         /* meaning of flags depends on record type and values are
609            the same as in lsa.idl, see collision record types */
610         typedef [public,gensize,flag(NDR_NOALIGN)] struct {
611                 uint32 flags;
612                 NTTIME timestamp;
613                 ForestTrustInfoRecordType type;
614                 [switch_is(type)] ForestTrustData data;
615         } ForestTrustInfoRecord;
616
617         typedef [flag(NDR_NOALIGN)] struct {
618                 [value(ndr_size_ForestTrustInfoRecord(&record, ndr->iconv_convenience, ndr->flags))] uint32 record_size;
619                 ForestTrustInfoRecord record;
620         } ForestTrustInfoRecordArmor;
621
622         typedef [public,flag(NDR_NOALIGN)] struct {
623                 uint32 version;
624                 uint32 count;
625                 ForestTrustInfoRecordArmor records[count];
626         } ForestTrustInfo;
627
628         void decode_ForestTrustInfo(
629                 [in] ForestTrustInfo blob
630                 );
631 }