r2992: drsuapi uses WERROR not NTSTATUS
[ira/wip.git] / source / librpc / idl / drsuapi.idl
1 #include "idl_types.h"
2
3
4   uuid(e3514235-4b06-11d1-ab04-00c04fc2dcd2),
5   version(4.0),
6   endpoints(lsass,protected_storage,TCP-0),
7   helpstring("Active Directory Replication"),
8   pointer_default(unique)
9
10 interface drsuapi
11 {
12         /*****************/
13         /* Function 0x00 */
14
15         typedef [flag(NDR_PAHEX)] struct {
16                 [range(1,10000)] uint32 length;
17                 [size_is(length)] uint8 data[];
18         } drsuapi_DsBindInfo;
19
20         WERROR drsuapi_DsBind(
21                 [in]        GUID *server_guid,
22                 [in,out]    drsuapi_DsBindInfo *bind_info,
23                 [out,ref]   policy_handle *bind_handle
24                 );
25
26         /*****************/
27         /* Function 0x01 */
28         WERROR drsuapi_DsUnbind(
29                 [in,out,ref] policy_handle *bind_handle
30                 );
31
32         /*****************/
33         /* Function 0x02 */
34         WERROR DRSUAPI_REPLICA_SYNC();
35
36         /*****************/
37         /* Function 0x03 */
38         WERROR DRSUAPI_GET_NC_CHANGES();
39
40         /*****************/
41         /* Function 0x04 */
42         WERROR DRSUAPI_UPDATE_REFS();
43
44         /*****************/
45         /* Function 0x05 */
46         WERROR DRSUAPI_REPLICA_ADD();
47
48         /*****************/
49         /* Function 0x06 */
50         WERROR DRSUAPI_REPLICA_DEL();
51
52         /*****************/
53         /* Function 0x07 */
54         WERROR DRSUAPI_REPLICA_MODIFY();
55
56         /*****************/
57         /* Function 0x08 */
58         WERROR DRSUAPI_VERIFY_NAMES();
59
60         /*****************/
61         /* Function 0x09 */
62         WERROR DRSUAPI_GET_MEMBERSHIPS();
63
64         /*****************/
65         /* Function 0x0a */
66         WERROR DRSUAPI_INTER_DOMAIN_MOVE();
67
68         /*****************/
69         /* Function 0x0b */
70         WERROR DRSUAPI_GET_NT4_CHANGELOG();
71
72         /*****************/
73         /* Function 0x0c */
74         typedef enum {
75                 DRSUAPI_DS_NAME_STATUS_OK                       = 0,
76                 DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR            = 1,
77                 DRSUAPI_DS_NAME_STATUS_NOT_FOUND                = 2,
78                 DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE               = 3,
79                 DRSUAPI_DS_NAME_STATUS_NO_MAPPING               = 4,
80                 DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY              = 5,
81                 DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING   = 6,
82                 DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL           = 7
83         } drsuapi_DsNameStatus;
84
85         typedef enum {
86                 DRSUAPI_DS_NAME_FLAG_NO_FLAGS                   = 0x0,
87                 DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY           = 0x1,
88                 DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC                 = 0x2,
89                 DRSUAPI_DS_NAME_FLAG_GCVERIFY                   = 0x4,
90                 DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL             = 0x8
91         } drsuapi_DsNameFlags;
92
93         typedef enum {
94                 DRSUAPI_DS_NAME_FORMAT_UKNOWN                   = 0,
95                 DRSUAPI_DS_NAME_FORMAT_FQDN_1779                = 1,
96                 DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT              = 2,
97                 DRSUAPI_DS_NAME_FORMAT_DISPLAY                  = 3,
98                 DRSUAPI_DS_NAME_FORMAT_GUID                     = 6,
99                 DRSUAPI_DS_NAME_FORMAT_CANONICAL                = 7,
100                 DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL           = 8,
101                 DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX             = 9,
102                 DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL        = 10,
103                 DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY       = 11,
104                 DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN               = 12
105         } drsuapi_DsNameFormat;
106
107         typedef struct {
108                 unistr *str;
109         } drsuapi_DsNameString;
110
111         typedef struct {
112                 uint32 unknown1; /* 0x000004e4 */
113                 uint32 unknown2; /* 0x00000407 */
114                 uint32 format_flags;
115                 uint32 format_offered;
116                 uint32 format_desired;
117                 [range(1,10000)] uint32 count;
118                 [size_is(count)] drsuapi_DsNameString *names;
119         } drsuapi_DsNameRequest1;
120
121         typedef union {
122                 [case(1)] drsuapi_DsNameRequest1 req1;
123         } drsuapi_DsNameRequest;
124
125         typedef struct {
126                 uint32 status;
127                 unistr *dns_domain_name;
128                 unistr *result_name;
129         } drsuapi_DsNameInfo1;
130
131         typedef struct {
132                 uint32 count;
133                 [size_is(count)] drsuapi_DsNameInfo1 *array;
134         } drsuapi_DsNameCtr1;
135
136         typedef union {
137                 [case(1)] drsuapi_DsNameCtr1 *ctr1;
138         } drsuapi_DsNameCtr;
139
140         WERROR drsuapi_DsCrackNames(
141                 [in,ref] policy_handle *bind_handle,
142                 [in, out] uint32 level,
143                 [in,switch_is(level)] drsuapi_DsNameRequest req,
144                 [out,switch_is(level)] drsuapi_DsNameCtr ctr
145                 );
146
147         /*****************/
148         /* Function 0x0d */
149         WERROR DRSUAPI_WRITE_SPN();
150
151         /*****************/
152         /* Function 0x0e */
153         WERROR DRSUAPI_REMOVE_DS_SERVER();
154
155         /*****************/
156         /* Function 0x0f */
157         WERROR DRSUAPI_REMOVE_DS_DOMAIN();
158
159         /*****************/
160         /* Function 0x10 */
161         typedef struct {
162                 unistr *domain_name; /* netbios or dns */
163                 int32 level; /* specifies the switch level for the request */
164         } drsuapi_DsGetDCInfoRequest1;
165
166         typedef union {
167                 [case(1)] drsuapi_DsGetDCInfoRequest1 req1;
168         } drsuapi_DsGetDCInfoRequest;
169
170         typedef struct {
171                 unistr *netbios_name;
172                 unistr *dns_name;
173                 unistr *site_name;
174                 unistr *computer_dn;
175                 unistr *server_dn;
176                 uint32 is_pdc;
177                 uint32 is_enabled;
178         } drsuapi_DsGetDCInfo1;
179
180         typedef struct {
181                 [range(0,10000)] uint32 count;
182                 [size_is(count)] drsuapi_DsGetDCInfo1 *array;
183         } drsuapi_DsGetDCInfoCtr1;
184
185         typedef struct {
186                 unistr *netbios_name;
187                 unistr *dns_name;
188                 unistr *site_name;
189                 unistr *site_dn;
190                 unistr *computer_dn;
191                 unistr *server_dn;
192                 unistr *ntds_dn;
193                 uint32 is_pdc;
194                 uint32 is_enabled;
195                 uint32 is_gc;
196                 GUID site_guid;
197                 GUID computer_guid;
198                 GUID server_guid;
199                 GUID ntds_guid;
200         } drsuapi_DsGetDCInfo2;
201
202         typedef struct {
203                 [range(0,10000)] uint32 count;
204                 [size_is(count)] drsuapi_DsGetDCInfo2 *array;
205         } drsuapi_DsGetDCInfoCtr2;
206
207         typedef struct {
208                 uint32 unknown1;
209                 uint32 unknown2;
210                 uint32 unknown3;
211                 uint32 unknown4;
212                 uint32 unknown5;
213                 uint32 unknown6;
214                 unistr *server_nt4_account;
215         } drsuapi_DsGetDCInfo01;
216
217         typedef struct {
218                 [range(0,10000)] uint32 count;
219                 [size_is(count)] drsuapi_DsGetDCInfo01 *array;
220         } drsuapi_DsGetDCInfoCtr01;
221
222         typedef union {
223                 [case(1)] drsuapi_DsGetDCInfoCtr1 ctr1;
224                 [case(2)] drsuapi_DsGetDCInfoCtr2 ctr2;
225                 [case(-1)] drsuapi_DsGetDCInfoCtr01 ctr01;
226         } drsuapi_DsGetDCInfoCtr;
227
228         /* maybe WERROR function */
229         WERROR drsuapi_DsGetDomainControllerInfo(
230                 [in,ref] policy_handle *bind_handle,
231                 [in, out] int32 level,
232                 [in,switch_is(level)] drsuapi_DsGetDCInfoRequest req,
233                 [out,switch_is(level)] drsuapi_DsGetDCInfoCtr ctr
234                 );
235
236         /*****************/
237         /* Function 0x11 */
238         WERROR DRSUAPI_ADD_ENTRY();
239
240         /*****************/
241         /* Function 0x12 */
242         WERROR DRSUAPI_EXECUTE_KCC();
243
244         /*****************/
245         /* Function 0x13 */
246         WERROR DRSUAPI_GET_REPL_INFO();
247
248         /*****************/
249         /* Function 0x14 */
250         WERROR DRSUAPI_ADD_SID_HISTORY();
251
252         /*****************/
253         /* Function 0x15 */
254         WERROR DRSUAPI_GET_MEMBERSHIPS2();
255
256         /*****************/
257         /* Function 0x16 */
258         WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
259
260         /*****************/
261         /* Function 0x17 */
262         WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
263
264         /*****************/
265         /* Function 0x18 */
266         WERROR DRSUAPI_QUERY_SITES_BY_COST();
267 }