3b538334f7c2df4d5707a5917067f6deef462782
[samba.git] / source4 / librpc / idl / drsblobs.idl
1 #include "idl_types.h"
2
3 [
4   uuid("38578646-4566-4564-2244-275796345667"),
5   version(0.0),
6   helpstring("Active Directory Replication LDAP Blobs")
7 ]
8 interface drsblobs {
9         /*
10          * replPropertyMetaData
11          * w2k  uses version 1
12          * w2k3 uses version 1
13          */
14         typedef struct {
15                 uint32 attribute_id;
16                 uint32 version;
17                 NTTIME_1sec orginating_time;
18                 GUID orginating_dsa;
19                 uint64 orginating_usn;
20                 uint64 local_usn;
21         } replPropertyMetaData1;
22
23         typedef struct {
24                 uint32 count;
25                 uint32 reserved;
26                 replPropertyMetaData1 array[count];
27         } replPropertyMetaDataCtr1;
28
29         typedef [nodiscriminant] union {
30                 [case(1)] replPropertyMetaDataCtr1 ctr1;
31         } replPropertyMetaDataCtr;
32         
33         typedef [public] struct {
34                 uint32 version;
35                 uint32 reserved;
36                 [switch_is(version)] replPropertyMetaDataCtr ctr;
37         } replPropertyMetaDataBlob;
38
39         void decode_replPropertyMetaData(
40                 [in] replPropertyMetaDataBlob blob
41                 );
42
43         /*
44          * replUpToDateVector
45          * w2k  uses version 1
46          * w2k3 uses version 2
47          */
48         typedef struct {
49                 GUID invocation_id_guid;
50                 uint64 highest_usn; /* updated after a full replication cycle */
51         } replUpToDateVector1;
52
53         typedef struct {
54                 uint32 count;
55                 uint32 reserved;
56                 replUpToDateVector1 array[count];
57         } replUpToDateVectorCtr1;
58
59         typedef struct {
60                 GUID invocation_id_guid;
61                 uint64 highest_usn; /* updated after a full replication cycle */
62                 NTTIME_1sec last_success;
63         } replUpToDateVector2;
64
65         typedef struct {
66                 uint32 count;
67                 uint32 reserved;
68                 replUpToDateVector2 array[count];
69         } replUpToDateVectorCtr2;
70
71         typedef [nodiscriminant] union {
72                 [case(1)] replUpToDateVectorCtr1 ctr1;
73                 [case(2)] replUpToDateVectorCtr2 ctr2;
74         } replUpToDateVectorCtr;
75
76         typedef [public] struct {
77                 uint32 version;
78                 uint32 reserved;
79                 [switch_is(version)] replUpToDateVectorCtr ctr;
80         } replUpToDateVectorBlob;
81
82         void decode_replUpToDateVector(
83                 [in] replUpToDateVectorBlob blob
84                 );
85
86         /*
87          * repsFrom/repsTo
88          * w2k  uses version 1
89          * w2k3 uses version 1
90          */
91         typedef [gensize] struct {
92                 asclstr dns_name;
93         } repsFromTo1OtherInfo;
94
95         typedef [gensize,flag(NDR_PAHEX)] struct {
96                 /* this includes the 8 bytes of the repsFromToBlob header */
97                 [value(ndr_size_repsFromTo1(8, r, ndr->flags))] uint32 blobsize;
98                 uint32 consecutive_failures;
99                 NTTIME_1sec last_success;
100                 NTTIME_1sec last_attempt;
101                 WERROR result_last_attempt;
102                 [relative,length_is(other_info_length)] repsFromTo1OtherInfo *other_info;
103                 [value(ndr_size_repsFromTo1OtherInfo(0, r->other_info, ndr->flags))] uint32 other_info_length;
104                 uint32 replica_flags;
105                 uint8 schedule[84];
106                 uint32 reserved;
107                 uint64 tmp_highest_usn; /* updated after each object update */
108                 uint64 reserved_usn;
109                 uint64 highest_usn; /* updated after a full replication cycle */
110                 GUID dsa_guid;
111                 GUID invocation_id_guid;
112                 GUID transport_guid;
113         } repsFromTo1;
114
115         typedef [nodiscriminant] union {
116                 [case(1)] repsFromTo1 ctr1;
117         } repsFromTo;
118
119         typedef [public] struct {
120                 uint32 version;
121                 uint32 reserved;
122                 [switch_is(version)] repsFromTo ctr;
123         } repsFromToBlob;
124
125         void decode_repsFromTo(
126                 [in] repsFromToBlob blob
127                 );
128 }