blob: 7e9a0a42d1cbae57e9553524be1588dac4d221e5 (
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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _NETDFS_NDL_
#define _NETDFS_NDL_
/*
* NT Distributed File Service (NETDFS) RPC interface definition.
*/
#include <libmlrpc/ndrtypes.ndl>
#define NETDFS_ABSTRACT_UUID "4fc742e0-4a10-11cf-8273-00aa004ae673"
#define NETDFS_ABSTRACT_VERS 3
#define NETDFS_TRANSFER_UUID "8a885d04-1ceb-11c9-9fe8-08002b104860"
#define NETDFS_TRANSFER_VERS 2
#define NETDFS_OPNUM_GETVER 0x00
#define NETDFS_OPNUM_ADD 0x01
#define NETDFS_OPNUM_REMOVE 0x02
#define NETDFS_OPNUM_SETINFO 0x03
#define NETDFS_OPNUM_GETINFO 0x04
#define NETDFS_OPNUM_ENUM 0x05
#define NETDFS_OPNUM_MOVE 0x06
#define NETDFS_OPNUM_RENAME 0x07
#define NETDFS_OPNUM_ADDSTDROOT 0x0c
#define NETDFS_OPNUM_REMSTDROOT 0x0d
#define NETDFS_OPNUM_ENUMEX 0x15
#define DFS_MANAGER_VERSION_NT4 0x01
#define DFS_MANAGER_VERSION_W2K 0x02
#define DFS_MANAGER_VERSION_W2K3 0x04
struct netdfs_uuid {
DWORD data1;
WORD data2;
WORD data3;
BYTE data4[8];
};
typedef struct netdfs_uuid netdfs_uuid_t;
struct netdfs_storage_info {
DWORD state;
LPTSTR server;
LPTSTR share;
};
typedef struct netdfs_storage_info netdfs_storage_info_t;
struct netdfs_storage_info1 {
DWORD state;
LPTSTR server;
LPTSTR share;
DWORD p_class;
WORD p_rank;
WORD p_reserved;
};
typedef struct netdfs_storage_info1 netdfs_storage_info1_t;
struct netdfs_info1 {
LPTSTR entry_path;
};
typedef struct netdfs_info1 netdfs_info1_t;
struct netdfs_info2 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD n_store;
};
typedef struct netdfs_info2 netdfs_info2_t;
struct netdfs_info3 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info *si;
};
typedef struct netdfs_info3 netdfs_info3_t;
struct netdfs_info4 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info *si;
};
typedef struct netdfs_info4 netdfs_info4_t;
struct netdfs_info5 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD flags;
DWORD metadata_sz;
DWORD n_store;
};
typedef struct netdfs_info5 netdfs_info5_t;
struct netdfs_info6 {
LPTSTR entry_path;
LPTSTR comment;
DWORD state;
DWORD timeout;
netdfs_uuid_t guid;
DWORD flags;
DWORD metadata_sz;
DWORD n_store;
SIZE_IS(n_store)
struct netdfs_storage_info1 *si;
};
typedef struct netdfs_info6 netdfs_info6_t;
struct netdfs_info100 {
LPTSTR comment;
};
typedef struct netdfs_info100 netdfs_info100_t;
struct netdfs_info101 {
DWORD state;
};
typedef struct netdfs_info101 netdfs_info101_t;
struct netdfs_info102 {
DWORD timeout;
};
typedef struct netdfs_info102 netdfs_info102_t;
struct netdfs_info103 {
DWORD property_flag_mask;
DWORD property_flags;
};
typedef struct netdfs_info103 netdfs_info103_t;
struct netdfs_info104 {
DWORD priority_class;
WORD priority_rank;
WORD reserved;
};
typedef struct netdfs_info104 netdfs_info104_t;
struct netdfs_info105 {
LPTSTR comment;
DWORD state;
DWORD timeout;
DWORD property_flag_mask;
DWORD property_flags;
};
typedef struct netdfs_info105 netdfs_info105_t;
struct netdfs_info106 {
DWORD storage_state;
DWORD priority_class;
DWORD priority_rank;
};
struct netdfs_info200 {
LPTSTR entry_path;
};
struct netdfs_info300 {
DWORD flavor;
LPTSTR dfsname;
};
typedef struct netdfs_info300 netdfs_info300_t;
union netdfs_info_u {
CASE(1) struct netdfs_info1 *info1;
CASE(2) struct netdfs_info2 *info2;
CASE(3) struct netdfs_info3 *info3;
CASE(4) struct netdfs_info4 *info4;
CASE(5) struct netdfs_info5 *info5;
CASE(6) struct netdfs_info6 *info6;
CASE(100) struct netdfs_info100 *info100;
CASE(101) struct netdfs_info101 *info101;
CASE(102) struct netdfs_info102 *info102;
CASE(103) struct netdfs_info103 *info103;
CASE(104) struct netdfs_info104 *info104;
CASE(105) struct netdfs_info105 *info105;
CASE(106) struct netdfs_info106 *info106;
DEFAULT char *nullptr;
};
struct netdfs_info {
DWORD level;
SWITCH(level)
union netdfs_info_u iu;
};
typedef struct netdfs_info netdfs_info_t;
struct netdfs_array1 {
DWORD count;
SIZE_IS(count)
struct netdfs_info1 *info1;
};
struct netdfs_array2 {
DWORD count;
SIZE_IS(count)
struct netdfs_info2 *info2;
};
struct netdfs_array3 {
DWORD count;
SIZE_IS(count)
struct netdfs_info3 *info3;
};
struct netdfs_array4 {
DWORD count;
SIZE_IS(count)
struct netdfs_info4 *info4;
};
struct netdfs_array5 {
DWORD count;
SIZE_IS(count)
struct netdfs_info5 *info5;
};
struct netdfs_array6 {
DWORD count;
SIZE_IS(count)
struct netdfs_info6 *info6;
};
struct netdfs_array200 {
DWORD count;
SIZE_IS(count)
struct netdfs_info200 *info200;
};
struct netdfs_array300 {
DWORD count;
SIZE_IS(count)
struct netdfs_info300 *info300;
};
union netdfs_enum_info_u {
CASE(1) struct netdfs_array1 *info1;
CASE(2) struct netdfs_array2 *info2;
CASE(3) struct netdfs_array3 *info3;
CASE(4) struct netdfs_array4 *info4;
CASE(5) struct netdfs_array5 *info5;
CASE(6) struct netdfs_array6 *info6;
CASE(200) struct netdfs_array200 *info200;
CASE(300) struct netdfs_array300 *info300;
DEFAULT char *nullptr;
};
struct netdfs_enum_info {
DWORD level;
DWORD switch_value;
SWITCH(switch_value)
union netdfs_enum_info_u iu;
};
/*
***********************************************************************
* Return server version id
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_GETVER)
struct netdfs_getver {
OUT DWORD version;
};
/*
***********************************************************************
* Add a new volume or additional storage for an existing volume at
* dfs_path.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ADD)
struct netdfs_add {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR server;
IN LPTSTR share;
IN LPTSTR comment;
IN DWORD flags;
OUT DWORD status;
};
typedef struct netdfs_add netdfs_add_t;
/*
***********************************************************************
* Remove a volume or additional storage for volume from the DFS at
* dfs_path. When applied to the last storage in a volume, removes
* the volume from the DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_REMOVE)
struct netdfs_remove {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
OUT DWORD status;
};
/*
***********************************************************************
* Set information about the volume or storage. If the server and share
* are specified, the information set is specific to that server and
* share. Otherwise the information is specific to the volume as a whole.
*
* Valid levels are 100-102.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_SETINFO)
struct netdfs_setinfo {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
IN DWORD level;
IN struct netdfs_info info;
OUT DWORD status;
};
typedef struct netdfs_setinfo netdfs_setinfo_t;
/*
***********************************************************************
* Get information about the volume or storage. If the server and share
* are specified, the information returned is specific to that server
* and share. Otherwise the information is specific to the volume as a
* whole.
*
* Valid levels are 1-4, 100-102.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_GETINFO)
struct netdfs_getinfo {
IN REFERENCE LPTSTR dfs_path;
IN LPTSTR server;
IN LPTSTR share;
IN DWORD level;
OUT struct netdfs_info info;
OUT DWORD status;
};
typedef struct netdfs_getinfo netdfs_getinfo_t;
/*
***********************************************************************
* Get information about all of the volumes in the DFS. dfs_path is
* the "server" part of the UNC name used to refer to this particular
* DFS.
*
* Valid levels are 1-3.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ENUM)
struct netdfs_enum {
IN DWORD level;
IN DWORD pref_max_len;
INOUT struct netdfs_enum_info *info;
INOUT DWORD *resume_handle;
OUT DWORD status;
};
typedef struct netdfs_enum netdfs_enum_t;
/*
***********************************************************************
* Rename the current Win32 path in a DFS to a new Win32 path in the
* same DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_RENAME)
struct netdfs_rename {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR new_path;
OUT DWORD status;
};
/*
***********************************************************************
* Move a DFS volume and all subordinate volumes from one place in the
* DFS to another place in the DFS.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_MOVE)
struct netdfs_move {
IN REFERENCE LPTSTR dfs_path;
IN REFERENCE LPTSTR new_path;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Add a DFS root share.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ADDSTDROOT)
struct netdfs_addstdroot {
IN REFERENCE LPTSTR server;
IN REFERENCE LPTSTR share;
IN REFERENCE LPTSTR comment;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Remove a DFS root share.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_REMSTDROOT)
struct netdfs_remstdroot {
IN REFERENCE LPTSTR server;
IN REFERENCE LPTSTR share;
IN DWORD flags;
OUT DWORD status;
};
/*
***********************************************************************
* Get information about all of the volumes in the DFS. dfs_path is
* the "server" part of the UNC name used to refer to this particular
* DFS.
*
* Valid levels are 1-3.
***********************************************************************
*/
OPERATION(NETDFS_OPNUM_ENUMEX)
struct netdfs_enumex {
IN REFERENCE LPTSTR dfs_path;
IN DWORD level;
IN DWORD pref_max_len;
INOUT struct netdfs_enum_info *info;
INOUT DWORD *resume_handle;
OUT DWORD status;
};
/*
***********************************************************************
* The NETDFS interface definiton.
***********************************************************************
*/
INTERFACE(0)
union netdfs_interface {
CASE(NETDFS_OPNUM_GETVER)
struct netdfs_getver netdfs_getver;
CASE(NETDFS_OPNUM_ADD)
struct netdfs_add netdfs_add;
CASE(NETDFS_OPNUM_REMOVE)
struct netdfs_remove netdfs_remove;
CASE(NETDFS_OPNUM_SETINFO)
struct netdfs_setinfo netdfs_setinfo;
CASE(NETDFS_OPNUM_GETINFO)
struct netdfs_getinfo netdfs_getinfo;
CASE(NETDFS_OPNUM_ENUM)
struct netdfs_enum netdfs_enum;
CASE(NETDFS_OPNUM_MOVE)
struct netdfs_move netdfs_move;
CASE(NETDFS_OPNUM_RENAME)
struct netdfs_rename netdfs_rename;
CASE(NETDFS_OPNUM_ADDSTDROOT)
struct netdfs_addstdroot netdfs_addstdroot;
CASE(NETDFS_OPNUM_REMSTDROOT)
struct netdfs_remstdroot netdfs_remstdroot;
CASE(NETDFS_OPNUM_ENUMEX)
struct netdfs_enumex netdfs_enumex;
};
typedef union netdfs_interface netdfs_interface_t;
EXTERNTYPEINFO(netdfs_interface)
#endif /* _NETDFS_NDL_ */
|