2004-11-23 20:38:32 +03:00
#include "idl_types.h"
2006-11-07 01:54:49 +03:00
import "drsuapi.idl";
2004-11-23 20:38:32 +03:00
[
2006-04-25 00:15:35 +04:00
uuid("12345778-1234-abcd-0001-00000001"),
2004-11-23 20:38:32 +03:00
version(0.0),
2005-02-13 02:03:26 +03:00
pointer_default(unique),
2006-11-07 01:54:49 +03:00
helpstring("Active Directory Replication LDAP Blobs")
2004-11-23 20:38:32 +03:00
]
interface drsblobs {
2005-03-22 17:49:11 +03:00
declare bitmap drsuapi_DsReplicaSyncOptions;
2005-03-23 21:54:06 +03:00
declare bitmap drsuapi_DsReplicaNeighbourFlags;
2005-03-22 17:49:11 +03:00
declare [v1_enum] enum drsuapi_DsAttributeId;
2004-11-24 17:33:40 +03:00
/*
* replPropertyMetaData
* w2k uses version 1
* w2k3 uses version 1
*/
2004-11-23 20:38:32 +03:00
typedef struct {
2005-03-22 17:49:11 +03:00
drsuapi_DsAttributeId attid;
2004-11-23 20:38:32 +03:00
uint32 version;
NTTIME_1sec orginating_time;
2005-03-22 17:49:11 +03:00
GUID orginating_invocation_id;
2005-01-27 09:33:07 +03:00
hyper orginating_usn;
hyper local_usn;
2004-11-24 17:33:40 +03:00
} replPropertyMetaData1;
2004-11-23 20:38:32 +03:00
typedef struct {
uint32 count;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2004-11-24 17:33:40 +03:00
replPropertyMetaData1 array[count];
} replPropertyMetaDataCtr1;
typedef [nodiscriminant] union {
[case(1)] replPropertyMetaDataCtr1 ctr1;
2004-11-23 20:38:32 +03:00
} replPropertyMetaDataCtr;
2004-11-24 17:33:40 +03:00
typedef [public] struct {
uint32 version;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2004-11-24 17:33:40 +03:00
[switch_is(version)] replPropertyMetaDataCtr ctr;
} replPropertyMetaDataBlob;
2004-11-23 20:38:32 +03:00
void decode_replPropertyMetaData(
2004-11-24 17:33:40 +03:00
[in] replPropertyMetaDataBlob blob
);
/*
* replUpToDateVector
* w2k uses version 1
* w2k3 uses version 2
*/
typedef struct {
uint32 count;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2007-01-03 18:18:17 +03:00
drsuapi_DsReplicaCursor cursors[count];
2004-11-24 17:33:40 +03:00
} replUpToDateVectorCtr1;
typedef struct {
uint32 count;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2007-01-03 18:18:17 +03:00
drsuapi_DsReplicaCursor2 cursors[count];
2004-11-24 17:33:40 +03:00
} replUpToDateVectorCtr2;
typedef [nodiscriminant] union {
[case(1)] replUpToDateVectorCtr1 ctr1;
[case(2)] replUpToDateVectorCtr2 ctr2;
} replUpToDateVectorCtr;
typedef [public] struct {
uint32 version;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2004-11-24 17:33:40 +03:00
[switch_is(version)] replUpToDateVectorCtr ctr;
} replUpToDateVectorBlob;
void decode_replUpToDateVector(
[in] replUpToDateVectorBlob blob
2004-11-23 20:38:32 +03:00
);
2004-11-25 14:20:09 +03:00
/*
* repsFrom/repsTo
* w2k uses version 1
* w2k3 uses version 1
*/
2005-12-25 04:33:35 +03:00
typedef [public,gensize] struct {
2004-11-25 14:20:09 +03:00
asclstr dns_name;
2004-11-27 18:10:57 +03:00
} repsFromTo1OtherInfo;
2005-12-25 04:33:35 +03:00
typedef [public,gensize,flag(NDR_PAHEX)] struct {
2004-11-27 18:10:57 +03:00
/* this includes the 8 bytes of the repsFromToBlob header */
2005-01-05 05:01:19 +03:00
[value(ndr_size_repsFromTo1(r, ndr->flags)+8)] uint32 blobsize;
2004-12-06 18:17:43 +03:00
uint32 consecutive_sync_failures;
2004-11-27 18:10:57 +03:00
NTTIME_1sec last_success;
NTTIME_1sec last_attempt;
WERROR result_last_attempt;
2005-03-05 21:34:18 +03:00
[relative] repsFromTo1OtherInfo *other_info;
2005-06-14 02:22:51 +04:00
[value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
2005-03-23 21:54:06 +03:00
drsuapi_DsReplicaNeighbourFlags replica_flags;
2004-11-27 18:10:57 +03:00
uint8 schedule[84];
uint32 reserved;
2005-03-23 21:54:06 +03:00
drsuapi_DsReplicaHighWaterMark highwatermark;
2004-12-06 18:17:43 +03:00
GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
2004-11-27 18:10:57 +03:00
GUID transport_guid;
2004-11-25 14:20:09 +03:00
} repsFromTo1;
typedef [nodiscriminant] union {
[case(1)] repsFromTo1 ctr1;
} repsFromTo;
2004-11-27 18:10:57 +03:00
typedef [public] struct {
2004-11-25 14:20:09 +03:00
uint32 version;
2004-11-27 18:10:57 +03:00
uint32 reserved;
2004-11-25 14:20:09 +03:00
[switch_is(version)] repsFromTo ctr;
} repsFromToBlob;
void decode_repsFromTo(
[in] repsFromToBlob blob
);
2005-03-17 03:33:56 +03:00
2006-12-28 22:43:43 +03:00
/*
* partialAttributeSet
* w2k uses version 1
* w2k3 uses version 1
*/
typedef struct {
uint32 count;
drsuapi_DsAttributeId array[count];
} partialAttributeSetCtr1;
typedef [nodiscriminant] union {
[case(1)] partialAttributeSetCtr1 ctr1;
} partialAttributeSetCtr;
typedef [public] struct {
uint32 version;
uint32 reserved;
[switch_is(version)] partialAttributeSetCtr ctr;
} partialAttributeSetBlob;
void decode_partialAttributeSet(
[in] partialAttributeSetBlob blob
);
2007-01-13 18:28:24 +03:00
/*
* prefixMap
* w2k unknown
* w2k3 unknown
* samba4 uses 0x44544442 'DSDB'
*
* as we windows don't return the prefixMap attribute when you ask for
* we don't know the format, but the attribute is not replicated
* so that we can choose our own format...
*/
typedef [v1_enum] enum {
PREFIX_MAP_VERSION_DSDB = 0x44544442
} prefixMapVersion;
typedef [nodiscriminant] union {
[case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
} prefixMapCtr;
typedef [public] struct {
prefixMapVersion version;
uint32 reserved;
[switch_is(version)] prefixMapCtr ctr;
} prefixMapBlob;
void decode_prefixMap(
[in] prefixMapBlob blob
);
/*
* the cookie for the LDAP dirsync control
*/
2006-01-17 20:15:07 +03:00
typedef [nodiscriminant,gensize] union {
[case(0)];
2007-01-11 17:21:23 +03:00
[default] replUpToDateVectorBlob uptodateness_vector;
2006-01-17 20:15:07 +03:00
} ldapControlDirSyncExtra;
typedef struct {
[value(3)] uint32 u1;
2005-03-17 03:33:56 +03:00
NTTIME time;
uint32 u2;
uint32 u3;
2007-01-11 17:21:23 +03:00
[value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
2006-01-17 20:15:07 +03:00
uint32 extra_length;
2005-03-23 21:54:06 +03:00
drsuapi_DsReplicaHighWaterMark highwatermark;
2005-03-17 03:33:56 +03:00
GUID guid1;
2006-01-17 20:15:07 +03:00
[switch_is(extra_length)] ldapControlDirSyncExtra extra;
2005-03-17 03:33:56 +03:00
} ldapControlDirSyncBlob;
2006-01-17 20:15:07 +03:00
typedef [public,relative_base] struct {
2006-01-20 02:04:14 +03:00
[charset(DOS),value("MSDS")] uint8 msds[4];
2006-01-17 20:15:07 +03:00
[subcontext(0)] ldapControlDirSyncBlob blob;
} ldapControlDirSyncCookie;
2005-03-17 03:33:56 +03:00
void decode_ldapControlDirSync(
2006-01-17 20:15:07 +03:00
[in] ldapControlDirSyncCookie cookie
2005-03-17 03:33:56 +03:00
);
2005-03-22 17:49:11 +03:00
2007-02-14 14:28:20 +03:00
typedef struct {
2007-02-14 01:13:59 +03:00
uint16 name_len;
uint16 data_len;
2007-02-14 14:28:20 +03:00
uint16 unknown1; /* 2 for name = 'Packages', 1 for name = 'Primary:*' */
2007-02-14 01:13:59 +03:00
[charset(UTF16)] uint8 name[name_len];
2007-02-14 14:28:20 +03:00
/*
* the data field contains data as HEX strings
*
* 'Packages':
* it seems to contains HEX strings
* of GUID's concatenated together.
* w2k only has 'Primary:Kerberos'
* and there's a 32 byte hex string.
* w2k3 also has 'Primary:WDigest'
* and there's a 64 byte hex string.
2007-02-14 15:21:16 +03:00
* ...but this 'Primary:CLEARTEXT'
* also there's a 104 byte hex string
* (instead of 3 * (16*2) = 96 ).
2007-02-14 14:28:20 +03:00
*
* 'Primary:Kerberos':
* ...
*
* 'Primary:WDigest':
* ...
2007-02-14 15:21:16 +03:00
*
* 'Primary:CLEARTEXT':
* data contains the cleartext password
* as UTF16 string encoded as HEX string
2007-02-14 14:28:20 +03:00
*/
[charset(DOS)] uint8 data[data_len];
2007-02-14 01:13:59 +03:00
} supplementalCredentialsPackage;
2007-02-14 14:28:20 +03:00
/* this are 0x30 (48) whitespaces (0x20) followed by 'P' (0x50) */
const string SUPPLEMENTAL_CREDENTIALS_PREFIX = " P";
typedef struct {
[value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x31];
2007-02-14 01:13:59 +03:00
uint16 num_packages;
supplementalCredentialsPackage packages[num_packages];
} supplementalCredentialsSubBlob;
typedef [public] struct {
2007-02-14 14:28:20 +03:00
[value(0)] uint32 unknown1;
uint32 __ndr_size;
[value(0)] uint32 unknown2;
[subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
[value(0)] uint8 unknown3;
2007-02-14 01:13:59 +03:00
} supplementalCredentialsBlob;
void decode_supplementalCredentials(
[in] supplementalCredentialsBlob blob
);
2005-03-22 17:49:11 +03:00
typedef [public] struct {
uint32 marker;
DATA_BLOB data;
} DsCompressedChunk;
typedef [public] struct {
DsCompressedChunk chunks[5];
} DsCompressedBlob;
void decode_DsCompressed(
[in] DsCompressedBlob blob
);
2004-11-23 20:38:32 +03:00
}