summaryrefslogtreecommitdiff
path: root/source4/librpc/idl/dfs.idl
blob: 1b145f3dfa384a9da39b133f8d6e719b931c964e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
/*
  dfs interface definition
*/

import "misc.idl";

[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
  version(3.0),
  pointer_default(unique),
  helpstring("Settings for Microsoft Distributed File System"),
  endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:")
] interface netdfs
{
	/******************/
	/* Function: 0x00 */
	typedef [v1_enum] enum {
		DFS_MANAGER_VERSION_NT4		= 1,
		DFS_MANAGER_VERSION_W2K		= 2,
		DFS_MANAGER_VERSION_W2K3	= 4,
		DFS_MANAGER_VERSION_W2K8	= 6
	} dfs_ManagerVersion;

	[public] void dfs_GetManagerVersion(
		[out]		dfs_ManagerVersion *version
		);


	/******************/
	/* Function: 0x01 */
	WERROR dfs_Add (
		[in]		[string,charset(UTF16)] uint16 *path,
		[in]		[string,charset(UTF16)] uint16 *server,
		[in,unique]	[string,charset(UTF16)] uint16 *share,
		[in,unique]	[string,charset(UTF16)] uint16 *comment,
		[in]		uint32 flags
		);

	/******************/
	/* Function: 0x02 */
	WERROR dfs_Remove (
		[in]		[string,charset(UTF16)] uint16 *dfs_entry_path,
		[in,unique]	[string,charset(UTF16)] uint16 *servername,
		[in,unique]	[string,charset(UTF16)] uint16 *sharename
		);

	/******************/
	/* Function: 0x03 */

	typedef struct {
	} dfs_Info0;

	typedef struct {
		[string,charset(UTF16)] uint16 *path;
	} dfs_Info1;

	typedef [public,bitmap32bit] bitmap {
		DFS_VOLUME_STATE_OK 		= 0x1,
		DFS_VOLUME_STATE_INCONSISTENT 	= 0x2,
		DFS_VOLUME_STATE_OFFLINE 	= 0x3,
		DFS_VOLUME_STATE_ONLINE		= 0x4,
		DFS_VOLUME_STATE_STANDALONE	= DFS_VOLUME_FLAVOR_STANDALONE,
		DFS_VOLUME_STATE_AD_BLOB	= DFS_VOLUME_FLAVOR_AD_BLOB
	} dfs_VolumeState;

	typedef struct {
		[string,charset(UTF16)] uint16 *path;
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 num_stores;
	} dfs_Info2;

	const int DFS_STORAGE_STATES = 0xf;

	/* yes, this is a bitmap */
	typedef [public,bitmap32bit] bitmap {
		DFS_STORAGE_STATE_OFFLINE 	= 1,
		DFS_STORAGE_STATE_ONLINE 	= 2,
		DFS_STORAGE_STATE_ACTIVE 	= 4
	} dfs_StorageState;

	typedef struct {
		dfs_StorageState state;
		[string,charset(UTF16)] uint16 *server;
		[string,charset(UTF16)] uint16 *share;
	} dfs_StorageInfo;

	typedef struct {
		[string,charset(UTF16)] uint16 *path;
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 num_stores;
		[size_is(num_stores)] dfs_StorageInfo *stores;
	} dfs_Info3;

	typedef struct {
		[string,charset(UTF16)] uint16 *path;
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 timeout;
		GUID   guid;
		uint32 num_stores;
		[size_is(num_stores)] dfs_StorageInfo *stores;
	} dfs_Info4;

	/* verified with dfsutil */
	typedef [public,bitmap32bit] bitmap {
		DFS_PROPERTY_FLAG_INSITE_REFERRALS	= 0x01,
		DFS_PROPERTY_FLAG_ROOT_SCALABILITY	= 0x02,
		DFS_PROPERTY_FLAG_SITE_COSTING 		= 0x04,
		DFS_PROPERTY_FLAG_TARGET_FAILBACK	= 0x08,
		DFS_PROPERTY_FLAG_CLUSTER_ENABLED	= 0x10	/* untested */
	} dfs_PropertyFlags;

	typedef struct {
		[string,charset(UTF16)] uint16 *path;
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 timeout;
		GUID   guid;
		dfs_PropertyFlags flags;
		uint32 pktsize;
		uint32 num_stores;
	} dfs_Info5;

	typedef [v1_enum] enum {
		DFS_INVALID_PRIORITY_CLASS	 	= -1,
		DFS_SITE_COST_NORMAL_PRIORITY_CLASS	= 0,
		DFS_GLOBAL_HIGH_PRIORITY_CLASS		= 1,
		DFS_SITE_COST_HIGH_PRIORITY_CLASS	= 2,
		DFS_SITE_COST_LOW_PRIORITY_CLASS	= 3,
		DFS_GLOBAL_LOW_PRIORITY_CLASS		= 4
	} dfs_Target_PriorityClass;

	typedef struct {
		dfs_Target_PriorityClass target_priority_class;
		uint16 target_priority_rank;
		uint16 reserved;
	} dfs_Target_Priority;

	typedef struct {
		dfs_StorageInfo info;
		dfs_Target_Priority target_priority;
	} dfs_StorageInfo2;

	typedef struct {
		[string,charset(UTF16)] uint16 *entry_path;
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 timeout;
		GUID   guid;
		dfs_PropertyFlags flags;
		uint32 pktsize;
		uint16 num_stores;
		[size_is(num_stores)] dfs_StorageInfo2 *stores;
	} dfs_Info6;

	typedef struct {
		GUID  generation_guid;
	} dfs_Info7;

	typedef struct {
		[string,charset(UTF16)] uint16 *comment;
	} dfs_Info100;

	typedef struct {
		dfs_StorageState state;
	} dfs_Info101;

	typedef struct {
		uint32 timeout;
	} dfs_Info102;

	typedef struct {
		dfs_PropertyFlags flags;
	} dfs_Info103;

	typedef struct {
		dfs_Target_Priority priority;
	} dfs_Info104;

	typedef struct {
		[string,charset(UTF16)] uint16 *comment;
		dfs_VolumeState state;
		uint32 timeout;
		uint32 property_flag_mask;
		uint32 property_flags;
	} dfs_Info105;

	typedef struct {
		dfs_StorageState state;
		dfs_Target_Priority priority;
	} dfs_Info106;

	typedef struct {
		[string,charset(UTF16)] uint16 *dom_root;
	} dfs_Info200;

        typedef enum {
		DFS_VOLUME_FLAVOR_STANDALONE = 0x100,
		DFS_VOLUME_FLAVOR_AD_BLOB = 0x200
	} dfs_VolumeFlavor;

	typedef struct {
		dfs_VolumeFlavor flavor;
		[string,charset(UTF16)] uint16 *dom_root;
	} dfs_Info300;

	typedef union {
		[case(0)]   dfs_Info0 *info0;
		[case(1)]   dfs_Info1 *info1;
		[case(2)]   dfs_Info2 *info2;
		[case(3)]   dfs_Info3 *info3;
		[case(4)]   dfs_Info4 *info4;
		[case(5)]   dfs_Info5 *info5;
		[case(6)]   dfs_Info6 *info6;
		[case(7)]   dfs_Info7 *info7;
		[case(100)] dfs_Info100 *info100;
		[case(101)] dfs_Info101 *info101;
		[case(102)] dfs_Info102 *info102;
		[case(103)] dfs_Info103 *info103;
		[case(104)] dfs_Info104 *info104;
		[case(105)] dfs_Info105 *info105;
		[case(106)] dfs_Info106 *info106;
	} dfs_Info;

	WERROR dfs_SetInfo (
		[in]	 	[string,charset(UTF16)] uint16 dfs_entry_path[],
		[in,unique]	[string,charset(UTF16)] uint16 *servername,
		[in,unique]	[string,charset(UTF16)] uint16 *sharename,
		[in]		uint32 level,
		[in,ref,switch_is(level)] dfs_Info *info
		);

	/******************/
	/* Function: 0x04 */
	WERROR dfs_GetInfo (
		[in]		[string,charset(UTF16)] uint16 dfs_entry_path[],
		[in,unique]	[string,charset(UTF16)] uint16 *servername,
		[in,unique]	[string,charset(UTF16)] uint16 *sharename,
		[in]		uint32 level,
		[out,switch_is(level)] dfs_Info *info
		);

	/******************/
	/* Function: 0x05 */

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info1 *s;
	} dfs_EnumArray1;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info2 *s;
	} dfs_EnumArray2;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info3 *s;
	} dfs_EnumArray3;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info4 *s;
	} dfs_EnumArray4;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info5 *s;
	} dfs_EnumArray5;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info6 *s;
	} dfs_EnumArray6;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info200 *s;
	} dfs_EnumArray200;

	typedef struct {
		uint32 count;
		[size_is(count)] dfs_Info300 *s;
	} dfs_EnumArray300;


	typedef union {
		[case(1)] dfs_EnumArray1 *info1;
		[case(2)] dfs_EnumArray2 *info2;
		[case(3)] dfs_EnumArray3 *info3;
		[case(4)] dfs_EnumArray4 *info4;
		[case(5)] dfs_EnumArray5 *info5;
		[case(6)] dfs_EnumArray6 *info6;
		[case(200)] dfs_EnumArray200 *info200;
		[case(300)] dfs_EnumArray300 *info300;
	} dfs_EnumInfo;

	typedef struct {
		uint32 level;
		[switch_is(level)] dfs_EnumInfo e;
	} dfs_EnumStruct;

	WERROR dfs_Enum (
		[in]		uint32 level,
		[in]		uint32 bufsize,
		[in,out,unique]	dfs_EnumStruct *info,
		[in,out,unique]	uint32 *total
		);

	/* Function 0x06 */
	[todo] WERROR dfs_Rename();

	/* Function 0x07 */
	[todo] WERROR dfs_Move();

	/* Function 0x08 */
	[todo] WERROR dfs_ManagerGetConfigInfo();

	/* Function 0x09 */
	[todo] WERROR dfs_ManagerSendSiteInfo();

	/* Function 0x0a */
	typedef struct {
		uint32 unknown1;
		[string,charset(UTF16)] uint16 *unknown2;
	} dfs_UnknownStruct;

	WERROR dfs_AddFtRoot(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 dns_servername[],
		[in]		[string,charset(UTF16)] uint16 dfsname[],
		[in]		[string,charset(UTF16)] uint16 rootshare[],
		[in]		[string,charset(UTF16)] uint16 comment[],
		[in]		[string,charset(UTF16)] uint16 dfs_config_dn[],
		[in]		uint8 unknown1,
		[in]		uint32 flags,
		[in,out,unique]	dfs_UnknownStruct **unknown2
		);

	/* Function 0x0b */
	WERROR dfs_RemoveFtRoot(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 dns_servername[],
		[in]		[string,charset(UTF16)] uint16 dfsname[],
		[in]		[string,charset(UTF16)] uint16 rootshare[],
		[in]		uint32 flags,
		[in,out,unique]	dfs_UnknownStruct **unknown
		);

	/* Function 0x0c */ 
	WERROR dfs_AddStdRoot(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 rootshare[],
		[in]		[string,charset(UTF16)] uint16 comment[],
		[in]		uint32 flags
		);
 
	/* Function 0x0d */
	WERROR dfs_RemoveStdRoot(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 rootshare[],
		[in]		uint32 flags
		);
 
	/* Function 0x0e */
	WERROR dfs_ManagerInitialize(
		[in]		[string,charset(UTF16)] uint16 *servername,
		[in]		uint32 flags
		);

	/* Function 0x0f */
	WERROR dfs_AddStdRootForced(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 rootshare[],
		[in]		[string,charset(UTF16)] uint16 comment[],
		[in]		[string,charset(UTF16)] uint16 store[] /* C:\\whatever */
		);

	/* Function 0x10 */
	WERROR dfs_GetDcAddress(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in,out,ref]	[string,charset(UTF16)] uint16 **server_fullname,
		[in,out,ref] 	boolean8 *is_root,
		[in,out,ref] 	uint32 *ttl
		);

	/* Function 0x11 */
	WERROR dfs_SetDcAddress(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 server_fullname[],
		[in]		uint32	flags,
		[in]		uint32	ttl
		);

	/* Function 0x12 */
	WERROR dfs_FlushFtTable(
		[in]		[string,charset(UTF16)] uint16 servername[],
		[in]		[string,charset(UTF16)] uint16 rootshare[]
		);

	/* Function 0x13 */
	[todo] WERROR dfs_Add2();

	/* Function 0x14 */
	[todo] WERROR dfs_Remove2();

	/* Function 0x15 */
	[public] WERROR dfs_EnumEx(
		[in]		[string,charset(UTF16)] uint16 dfs_name[],
		[in]		uint32 level,
		[in]		uint32 bufsize,
		[in,out,unique]	dfs_EnumStruct *info,
		[in,out,unique]	uint32 *total
	);

	/* Function 0x16 */
	[todo] WERROR dfs_SetInfo2();
}