s4-srvsvc: merge srvsvc_NetSessEnum from s3 idl.
[ira/wip.git] / source4 / librpc / idl / srvsvc.idl
1 #include "idl_types.h"
2
3 /*
4   srvsvc interface definitions
5 */
6 import "security.idl", "svcctl.idl";
7
8 [ uuid("4b324fc8-1670-01d3-1278-5a47bf6ee188"),
9   version(3.0),
10   endpoint("ncacn_np:[\\pipe\\srvsvc]", "ncacn_ip_tcp:", "ncalrpc:"),
11   pointer_default(unique),
12   helpstring("Server Service")
13 ] interface srvsvc
14 {
15         typedef bitmap svcctl_ServerType svcctl_ServerType;
16         typedef bitmap security_secinfo security_secinfo;
17
18 /**************************/
19 /* srvsvc_NetCharDev      */
20 /**************************/
21         typedef struct {
22                 [string,charset(UTF16)] uint16 *device;
23         } srvsvc_NetCharDevInfo0;
24
25         typedef struct {
26                 uint32 count;
27                 [size_is(count)] srvsvc_NetCharDevInfo0 *array;
28         } srvsvc_NetCharDevCtr0;
29
30         typedef struct {
31                 [string,charset(UTF16)] uint16 *device;
32                 uint32 status;
33                 [string,charset(UTF16)] uint16 *user;
34                 uint32 time;
35         } srvsvc_NetCharDevInfo1;
36
37         typedef struct {
38                 uint32 count;
39                 [size_is(count)] srvsvc_NetCharDevInfo1 *array;
40         } srvsvc_NetCharDevCtr1;
41
42         typedef union {
43                 [case(0)] srvsvc_NetCharDevInfo0 *info0;
44                 [case(1)] srvsvc_NetCharDevInfo1 *info1;
45                 [default] ;
46         } srvsvc_NetCharDevInfo;
47
48         typedef union {
49                 [case(0)] srvsvc_NetCharDevCtr0 *ctr0;
50                 [case(1)] srvsvc_NetCharDevCtr1 *ctr1;
51                 [default] ;
52         } srvsvc_NetCharDevCtr;
53
54         typedef struct {
55                 uint32 level;
56                 [switch_is(level)] srvsvc_NetCharDevCtr ctr;
57         } srvsvc_NetCharDevInfoCtr;
58
59         /******************/
60         /* Function: 0x00 */
61         WERROR srvsvc_NetCharDevEnum(
62                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
63                 [in,out,ref]  srvsvc_NetCharDevInfoCtr *info_ctr,
64                 [in]   uint32 max_buffer,
65                 [out,ref]   uint32 *totalentries,
66                 [in,out,unique]   uint32 *resume_handle
67                 );
68
69         /******************/
70         /* Function: 0x01 */
71         WERROR srvsvc_NetCharDevGetInfo(
72                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
73                 [in]   [string,charset(UTF16)] uint16 device_name[],
74                 [in]   uint32 level,
75                 [out,ref,switch_is(level)]   srvsvc_NetCharDevInfo *info
76                 );
77
78         /******************/
79         /* Function: 0x02 */
80         WERROR srvsvc_NetCharDevControl(
81                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
82                 [in]   [string,charset(UTF16)] uint16 device_name[],
83                 [in]   uint32 opcode
84                 );
85
86 /**************************/
87 /* srvsvc_NetCharDevQ     */
88 /**************************/
89         typedef struct {
90                 [string,charset(UTF16)] uint16 *device;
91         } srvsvc_NetCharDevQInfo0;
92
93         typedef struct {
94                 uint32 count;
95                 [size_is(count)] srvsvc_NetCharDevQInfo0 *array;
96         } srvsvc_NetCharDevQCtr0;
97
98         typedef struct {
99                 [string,charset(UTF16)] uint16 *device;
100                 uint32 priority;
101                 [string,charset(UTF16)] uint16 *devices;
102                 uint32 users;
103                 uint32 num_ahead;
104         } srvsvc_NetCharDevQInfo1;
105
106         typedef struct {
107                 uint32 count;
108                 [size_is(count)] srvsvc_NetCharDevQInfo1 *array;
109         } srvsvc_NetCharDevQCtr1;
110
111         typedef union {
112                 [case(0)] srvsvc_NetCharDevQInfo0 *info0;
113                 [case(1)] srvsvc_NetCharDevQInfo1 *info1;
114                 [default] ;
115         } srvsvc_NetCharDevQInfo;
116
117         typedef union {
118                 [case(0)] srvsvc_NetCharDevQCtr0 *ctr0;
119                 [case(1)] srvsvc_NetCharDevQCtr1 *ctr1;
120                 [default] ;
121         } srvsvc_NetCharDevQCtr;
122
123         typedef struct {
124                 uint32 level;
125                 [switch_is(level)] srvsvc_NetCharDevQCtr ctr;
126         } srvsvc_NetCharDevQInfoCtr;
127
128         /******************/
129         /* Function: 0x03 */
130         WERROR srvsvc_NetCharDevQEnum(
131                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
132                 [in,unique]   [string,charset(UTF16)] uint16 *user,
133                 [in,out,ref]  srvsvc_NetCharDevQInfoCtr *info_ctr,
134                 [in]   uint32 max_buffer,
135                 [out,ref]   uint32 *totalentries,
136                 [in,out,unique]   uint32 *resume_handle
137                 );
138
139         /******************/
140         /* Function: 0x04 */
141         WERROR srvsvc_NetCharDevQGetInfo(
142                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
143                 [in]   [string,charset(UTF16)] uint16 queue_name[],
144                 [in]   [string,charset(UTF16)] uint16 user[],
145                 [in]   uint32 level,
146                 [out,switch_is(level),ref]   srvsvc_NetCharDevQInfo *info
147                 );
148
149         /******************/
150         /* Function: 0x05 */
151         WERROR srvsvc_NetCharDevQSetInfo(
152                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
153                 [in]   [string,charset(UTF16)] uint16 queue_name[],
154                 [in]   uint32 level,
155                 [in,switch_is(level)]   srvsvc_NetCharDevQInfo info,
156                 [in,out,unique]   uint32 *parm_error
157                 );
158
159         /******************/
160         /* Function: 0x06 */
161         WERROR srvsvc_NetCharDevQPurge(
162                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
163                 [in]   [string,charset(UTF16)] uint16 queue_name[]
164                 );
165
166         /******************/
167         /* Function: 0x07 */
168         WERROR srvsvc_NetCharDevQPurgeSelf(
169                 [in,unique] [string,charset(UTF16)] uint16 *server_unc,
170                 [in]   [string,charset(UTF16)] uint16 queue_name[],
171                 [in]   [string,charset(UTF16)] uint16 computer_name[]
172                 );
173
174 /**************************/
175 /* srvsvc_NetConn         */
176 /**************************/
177         typedef struct {
178                 uint32 conn_id;
179         } srvsvc_NetConnInfo0;
180
181         typedef struct {
182                 uint32 count;
183                 [size_is(count)] srvsvc_NetConnInfo0 *array;
184         } srvsvc_NetConnCtr0;
185
186         typedef struct {
187                 uint32 conn_id;
188                 uint32 conn_type;
189                 uint32 num_open;
190                 uint32 num_users;
191                 uint32 conn_time;
192                 [string,charset(UTF16)] uint16 *user;
193                 [string,charset(UTF16)] uint16 *share;
194         } srvsvc_NetConnInfo1;
195
196         typedef struct {
197                 uint32 count;
198                 [size_is(count)] srvsvc_NetConnInfo1 *array;
199         } srvsvc_NetConnCtr1;
200
201         typedef union {
202                 [case(0)] srvsvc_NetConnCtr0 *ctr0;
203                 [case(1)] srvsvc_NetConnCtr1 *ctr1;
204                 [default] ;
205         } srvsvc_NetConnCtr;
206
207         typedef struct {
208                 uint32 level;
209                 [switch_is(level)] srvsvc_NetConnCtr ctr;
210         } srvsvc_NetConnInfoCtr;
211
212         /******************/
213         /* Function: 0x08 */
214         WERROR srvsvc_NetConnEnum(
215                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
216                 [in,unique]   [string,charset(UTF16)] uint16 *path,
217                 [in,out,ref]  srvsvc_NetConnInfoCtr *info_ctr,
218                 [in]   uint32 max_buffer,
219                 [out,ref]   uint32 *totalentries,
220                 [in,out,unique]   uint32 *resume_handle
221                 );
222
223 /**************************/
224 /* srvsvc_NetFile         */
225 /**************************/
226         typedef struct {
227                 uint32 fid;
228         } srvsvc_NetFileInfo2;
229
230         typedef struct {
231                 uint32 count;
232                 [size_is(count)] srvsvc_NetFileInfo2 *array;
233         } srvsvc_NetFileCtr2;
234
235         typedef struct {
236                 uint32 fid;
237                 uint32 permissions;
238                 uint32 num_locks;
239                 [string,charset(UTF16)] uint16 *path;
240                 [string,charset(UTF16)] uint16 *user;
241         } srvsvc_NetFileInfo3;
242
243         typedef struct {
244                 uint32 count;
245                 [size_is(count)] srvsvc_NetFileInfo3 *array;
246         } srvsvc_NetFileCtr3;
247
248         typedef union {
249                 [case(2)] srvsvc_NetFileInfo2 *info2;
250                 [case(3)] srvsvc_NetFileInfo3 *info3;
251                 [default] ;
252         } srvsvc_NetFileInfo;
253
254         typedef union {
255                 [case(2)] srvsvc_NetFileCtr2 *ctr2;
256                 [case(3)] srvsvc_NetFileCtr3 *ctr3;
257                 [default] ;
258         } srvsvc_NetFileCtr;
259
260         typedef struct {
261                 uint32 level;
262                 [switch_is(level)] srvsvc_NetFileCtr ctr;
263         } srvsvc_NetFileInfoCtr;
264
265         /******************/
266         /* Function: 0x09 */
267         WERROR srvsvc_NetFileEnum(
268                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
269                 [in,unique]   [string,charset(UTF16)] uint16 *path,
270                 [in,unique]   [string,charset(UTF16)] uint16 *user,
271                 [in,out,ref]   srvsvc_NetFileInfoCtr *info_ctr,
272                 [in]   uint32 max_buffer,
273                 [out,ref]   uint32 *totalentries,
274                 [in,out,unique]   uint32 *resume_handle
275                 );
276
277         /******************/
278         /* Function: 0x0a */
279         WERROR srvsvc_NetFileGetInfo(
280                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
281                 [in]   uint32 fid,
282                 [in]   uint32 level,
283                 [out,switch_is(level),ref]   srvsvc_NetFileInfo *info
284                 );
285
286         /******************/
287         /* Function: 0x0b */
288         WERROR srvsvc_NetFileClose(
289                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
290                 [in]   uint32 fid       
291                 );
292
293 /**************************/
294 /* srvsvc_NetSess         */
295 /**************************/
296         typedef struct {
297                 [string,charset(UTF16)] uint16 *client;
298         } srvsvc_NetSessInfo0;
299
300         typedef struct {
301                 uint32 count;
302                 [size_is(count)] srvsvc_NetSessInfo0 *array;
303         } srvsvc_NetSessCtr0;
304
305         typedef struct {
306                 [string,charset(UTF16)] uint16 *client;
307                 [string,charset(UTF16)] uint16 *user;
308                 uint32 num_open;
309                 uint32 time;
310                 uint32 idle_time;
311                 uint32 user_flags;
312         } srvsvc_NetSessInfo1;
313
314         typedef struct {
315                 uint32 count;
316                 [size_is(count)] srvsvc_NetSessInfo1 *array;
317         } srvsvc_NetSessCtr1;
318
319         typedef struct {
320                 [string,charset(UTF16)] uint16 *client;
321                 [string,charset(UTF16)] uint16 *user;
322                 uint32 num_open;
323                 uint32 time;
324                 uint32 idle_time;
325                 uint32 user_flags;
326                 [string,charset(UTF16)] uint16 *client_type;
327         } srvsvc_NetSessInfo2;
328
329         typedef struct {
330                 uint32 count;
331                 [size_is(count)] srvsvc_NetSessInfo2 *array;
332         } srvsvc_NetSessCtr2;
333
334         typedef struct {
335                 [string,charset(UTF16)] uint16 *client;
336                 [string,charset(UTF16)] uint16 *user;
337                 uint32 time;
338                 uint32 idle_time;
339         } srvsvc_NetSessInfo10;
340
341         typedef struct {
342                 uint32 count;
343                 [size_is(count)] srvsvc_NetSessInfo10 *array;
344         } srvsvc_NetSessCtr10;
345
346         typedef struct {
347                 [string,charset(UTF16)] uint16 *client;
348                 [string,charset(UTF16)] uint16 *user;
349                 uint32 num_open;
350                 uint32 time;
351                 uint32 idle_time;
352                 uint32 user_flags;
353                 [string,charset(UTF16)] uint16 *client_type;
354                 [string,charset(UTF16)] uint16 *transport;
355         } srvsvc_NetSessInfo502;
356
357         typedef struct {
358                 uint32 count;
359                 [size_is(count)] srvsvc_NetSessInfo502 *array;
360         } srvsvc_NetSessCtr502;
361
362         typedef union {
363                 [case(0)] srvsvc_NetSessCtr0 *ctr0;
364                 [case(1)] srvsvc_NetSessCtr1 *ctr1;
365                 [case(2)] srvsvc_NetSessCtr2 *ctr2;
366                 [case(10)] srvsvc_NetSessCtr10 *ctr10;
367                 [case(502)] srvsvc_NetSessCtr502 *ctr502;
368                 [default] ;
369         } srvsvc_NetSessCtr;
370
371         /******************/
372         /* Function: 0x0c */
373
374         typedef struct {
375                 uint32 level;
376                 [switch_is(level)] srvsvc_NetSessCtr ctr;
377         } srvsvc_NetSessInfoCtr;
378
379         WERROR srvsvc_NetSessEnum(
380                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
381                 [in,unique]   [string,charset(UTF16)] uint16 *client,
382                 [in,unique]   [string,charset(UTF16)] uint16 *user,
383                 [in,out,ref]   srvsvc_NetSessInfoCtr *info_ctr,
384                 [in]   uint32 max_buffer,
385                 [out,ref]   uint32 *totalentries,
386                 [in,out,unique]   uint32 *resume_handle
387                 );
388
389         /******************/
390         /* Function: 0x0d */
391         WERROR srvsvc_NetSessDel(
392                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
393                 [in,unique]   [string,charset(UTF16)] uint16 *client,
394                 [in,unique]   [string,charset(UTF16)] uint16 *user
395                 );
396
397 /**************************/
398 /* srvsvc_NetShare        */
399 /**************************/
400
401         /* share types */
402         const uint32 STYPE_TEMPORARY = 0x40000000; /* share is a temporary one */
403         const uint32 STYPE_HIDDEN    = 0x80000000; /* share is a hidden one */
404
405         typedef [v1_enum, flag(NDR_PAHEX)] enum {
406                 STYPE_DISKTREE = 0,
407                 STYPE_DISKTREE_TEMPORARY = STYPE_DISKTREE|STYPE_TEMPORARY,
408                 STYPE_DISKTREE_HIDDEN    = STYPE_DISKTREE|STYPE_HIDDEN,
409                 STYPE_PRINTQ   = 1,
410                 STYPE_PRINTQ_TEMPORARY = STYPE_PRINTQ|STYPE_TEMPORARY,
411                 STYPE_PRINTQ_HIDDEN    = STYPE_PRINTQ|STYPE_HIDDEN,
412                 STYPE_DEVICE   = 2,     /* Serial device */
413                 STYPE_DEVICE_TEMPORARY = STYPE_DEVICE|STYPE_TEMPORARY,
414                 STYPE_DEVICE_HIDDEN    = STYPE_DEVICE|STYPE_HIDDEN,
415                 STYPE_IPC      = 3,     /* Interprocess communication (IPC) */
416                 STYPE_IPC_TEMPORARY = STYPE_IPC|STYPE_TEMPORARY,
417                 STYPE_IPC_HIDDEN    = STYPE_IPC|STYPE_HIDDEN
418         } srvsvc_ShareType;
419
420         typedef struct {
421                 [string,charset(UTF16)] uint16 *name;
422         } srvsvc_NetShareInfo0;
423
424         typedef struct {
425                 uint32 count;
426                 [size_is(count)] srvsvc_NetShareInfo0 *array;
427         } srvsvc_NetShareCtr0;
428
429         typedef struct {
430                 [string,charset(UTF16)] uint16 *name;
431                 srvsvc_ShareType type;
432                 [string,charset(UTF16)] uint16 *comment;
433         } srvsvc_NetShareInfo1;
434
435         typedef struct {
436                 uint32 count;
437                 [size_is(count)] srvsvc_NetShareInfo1 *array;
438         } srvsvc_NetShareCtr1;
439
440         typedef struct {
441                 [string,charset(UTF16)] uint16 *name;
442                 srvsvc_ShareType type;
443                 [string,charset(UTF16)] uint16 *comment;
444                 uint32 permissions;
445                 uint32 max_users;
446                 uint32 current_users;
447                 [string,charset(UTF16)] uint16 *path;
448                 [string,charset(UTF16)] uint16 *password;
449         } srvsvc_NetShareInfo2;
450
451         typedef struct {
452                 uint32 count;
453                 [size_is(count)] srvsvc_NetShareInfo2 *array;
454         } srvsvc_NetShareCtr2;
455
456         typedef struct {
457                 [string,charset(UTF16)] uint16 *name;
458                 srvsvc_ShareType type;
459                 [string,charset(UTF16)] uint16 *comment;
460                 uint32 csc_policy;
461         } srvsvc_NetShareInfo501;
462
463         typedef struct {
464                 uint32 count;
465                 [size_is(count)] srvsvc_NetShareInfo501 *array;
466         } srvsvc_NetShareCtr501;
467
468         typedef struct {
469                 [string,charset(UTF16)] uint16 *name;
470                 srvsvc_ShareType type;
471                 [string,charset(UTF16)] uint16 *comment;
472                 uint32 permissions;
473                 uint32 max_users;
474                 uint32 current_users;
475                 [string,charset(UTF16)] uint16 *path;
476                 [string,charset(UTF16)] uint16 *password;
477                 sec_desc_buf sd_buf;
478         } srvsvc_NetShareInfo502;
479
480         typedef struct {
481                 uint32 count;
482                 [size_is(count)] srvsvc_NetShareInfo502 *array;
483         } srvsvc_NetShareCtr502;
484
485         typedef struct {
486                 [string,charset(UTF16)] uint16 *comment;
487         } srvsvc_NetShareInfo1004;
488
489         typedef struct {
490                 uint32 count;
491                 [size_is(count)] srvsvc_NetShareInfo1004 *array;
492         } srvsvc_NetShareCtr1004;
493
494         typedef bitmap {
495                 SHARE_1005_IN_DFS               = 0x00000001,
496                 SHARE_1005_DFS_ROOT             = 0x00000002
497         } NetShareInfo1005Flags;
498         
499         const uint32 SHARE_1005_CSC_POLICY_MASK = 0x00000030;
500         const uint32 SHARE_1005_CSC_POLICY_SHIFT = 4;
501
502         typedef struct {
503                 NetShareInfo1005Flags dfs_flags;
504         } srvsvc_NetShareInfo1005;
505
506         typedef struct {
507                 uint32 count;
508                 [size_is(count)] srvsvc_NetShareInfo1005 *array;
509         } srvsvc_NetShareCtr1005;
510
511         typedef struct {
512                 uint32 max_users;
513         } srvsvc_NetShareInfo1006;
514
515         typedef struct {
516                 uint32 count;
517                 [size_is(count)] srvsvc_NetShareInfo1006 *array;
518         } srvsvc_NetShareCtr1006;
519
520         typedef struct {
521                 uint32 flags;
522                 [string,charset(UTF16)] uint16 *alternate_directory_name;
523         } srvsvc_NetShareInfo1007;
524
525         typedef struct {
526                 uint32 count;
527                 [size_is(count)] srvsvc_NetShareInfo1007 *array;
528         } srvsvc_NetShareCtr1007;
529
530         typedef struct {
531                 uint32 count;
532                 [size_is(count)] sec_desc_buf *array;
533         } srvsvc_NetShareCtr1501;
534
535         typedef union {
536                 [case(0)] srvsvc_NetShareInfo0 *info0;
537                 [case(1)] srvsvc_NetShareInfo1 *info1;
538                 [case(2)] srvsvc_NetShareInfo2 *info2;
539                 [case(501)] srvsvc_NetShareInfo501 *info501;
540                 [case(502)] srvsvc_NetShareInfo502 *info502;
541                 [case(1004)] srvsvc_NetShareInfo1004 *info1004;
542                 [case(1005)] srvsvc_NetShareInfo1005 *info1005;
543                 [case(1006)] srvsvc_NetShareInfo1006 *info1006;
544                 [case(1007)] srvsvc_NetShareInfo1007 *info1007;
545                 [case(1501)] sec_desc_buf *info1501;
546                 [default] ;
547         } srvsvc_NetShareInfo;
548
549         typedef union {
550                 [case(0)] srvsvc_NetShareCtr0 *ctr0;
551                 [case(1)] srvsvc_NetShareCtr1 *ctr1;
552                 [case(2)] srvsvc_NetShareCtr2 *ctr2;
553                 [case(501)] srvsvc_NetShareCtr501 *ctr501;
554                 [case(502)] srvsvc_NetShareCtr502 *ctr502;
555                 [case(1004)] srvsvc_NetShareCtr1004 *ctr1004;
556                 [case(1005)] srvsvc_NetShareCtr1005 *ctr1005;
557                 [case(1006)] srvsvc_NetShareCtr1006 *ctr1006;
558                 [case(1007)] srvsvc_NetShareCtr1007 *ctr1007;
559                 [case(1501)] srvsvc_NetShareCtr1501 *ctr1501;
560                 [default] ;
561         } srvsvc_NetShareCtr;
562
563         typedef struct {
564                 uint32 level;
565                 [switch_is(level)] srvsvc_NetShareCtr ctr;
566         } srvsvc_NetShareInfoCtr;
567
568         /******************/
569         /* Function: 0x0e */
570         WERROR srvsvc_NetShareAdd(
571                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
572                 [in]   uint32 level,
573                 [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
574                 [in,out,unique]   uint32 *parm_error
575                 );
576
577         /******************/
578         /* Function: 0x0f */
579         WERROR srvsvc_NetShareEnumAll (
580                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
581                 [in,out]   uint32 level,
582                 [in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
583                 [in]   uint32 max_buffer,
584                 [out]  uint32 totalentries,
585                 [in,out,unique]   uint32 *resume_handle
586                 );
587
588         /******************/
589         /* Function: 0x10 */
590         WERROR srvsvc_NetShareGetInfo(
591                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
592                 [in]   [string,charset(UTF16)] uint16 share_name[],
593                 [in]   uint32 level,
594                 [out,ref,switch_is(level)] srvsvc_NetShareInfo *info
595                 );
596
597         /******************/
598         /* Function: 0x11 */
599         WERROR srvsvc_NetShareSetInfo(
600                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
601                 [in]   [string,charset(UTF16)] uint16 share_name[],
602                 [in]   uint32 level,
603                 [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
604                 [in,out,unique]   uint32 *parm_error
605                 );
606
607         /******************/
608         /* Function: 0x12 */
609         WERROR srvsvc_NetShareDel(
610                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
611                 [in]   [string,charset(UTF16)] uint16 share_name[],
612                 [in]   uint32 reserved
613                 );
614
615         /******************/
616         /* Function: 0x13 */
617         WERROR srvsvc_NetShareDelSticky(
618                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
619                 [in]   [string,charset(UTF16)] uint16 share_name[],
620                 [in]   uint32 reserved
621                 );
622         
623         /******************/
624         /* Function: 0x14 */
625         WERROR srvsvc_NetShareCheck(
626                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
627                 [in]   [string,charset(UTF16)] uint16 device_name[],
628                 [out,ref]  srvsvc_ShareType *type
629                 );
630
631 /**************************/
632 /* srvsvc_NetSrv          */
633 /**************************/
634         typedef [public,v1_enum] enum {
635                 PLATFORM_ID_DOS = 300,
636                 PLATFORM_ID_OS2 = 400,
637                 PLATFORM_ID_NT  = 500,
638                 PLATFORM_ID_OSF = 600,
639                 PLATFORM_ID_VMS = 700
640         } srvsvc_PlatformId;
641
642         typedef struct {
643                 srvsvc_PlatformId platform_id;
644                 [string,charset(UTF16)] uint16 *server_name;
645         } srvsvc_NetSrvInfo100;
646
647         typedef struct {
648                 srvsvc_PlatformId platform_id;
649                 [string,charset(UTF16)] uint16 *server_name;
650                 uint32 version_major;
651                 uint32 version_minor;
652                 svcctl_ServerType server_type;
653                 [string,charset(UTF16)] uint16 *comment;
654         } srvsvc_NetSrvInfo101;
655
656         typedef struct {
657                 srvsvc_PlatformId platform_id;
658                 [string,charset(UTF16)] uint16 *server_name;
659                 uint32 version_major;
660                 uint32 version_minor;
661                 svcctl_ServerType server_type;
662                 [string,charset(UTF16)] uint16 *comment;
663                 uint32 users;
664                 uint32 disc;
665                 uint32 hidden;
666                 uint32 announce;
667                 uint32 anndelta;
668                 uint32 licenses;
669                 [string,charset(UTF16)] uint16 *userpath;
670         } srvsvc_NetSrvInfo102;
671
672         typedef struct {
673                 uint32 ulist_mtime;
674                 uint32 glist_mtime;
675                 uint32 alist_mtime;
676                 [string,charset(UTF16)] uint16 *alerts;
677                 uint32 security;
678                 uint32 numadmin;
679                 uint32 lanmask;
680                 [string,charset(UTF16)] uint16 *guestaccount;
681                 uint32 chdevs;
682                 uint32 chdevqs;
683                 uint32 chdevjobs;
684                 uint32 connections;
685                 uint32 shares;
686                 uint32 openfiles;
687                 uint32 sessopen;
688                 uint32 sesssvc;
689                 uint32 sessreqs;
690                 uint32 opensearch;
691                 uint32 activelocks;
692                 uint32 numreqbufs;
693                 uint32 sizereqbufs;
694                 uint32 numbigbufs;
695                 uint32 numfiletasks;
696                 uint32 alertsched;
697                 uint32 erroralert;
698                 uint32 logonalert;
699                 uint32 accessalert;
700                 uint32 diskalert;
701                 uint32 netioalert;
702                 uint32 maxaudits;
703                 [string,charset(UTF16)] uint16 *srvheuristics;
704         } srvsvc_NetSrvInfo402;
705
706         typedef struct {
707                 uint32 ulist_mtime;
708                 uint32 glist_mtime;
709                 uint32 alist_mtime;
710                 [string,charset(UTF16)] uint16 *alerts;
711                 uint32 security;
712                 uint32 numadmin;
713                 uint32 lanmask;
714                 [string,charset(UTF16)] uint16 *guestaccount;
715                 uint32 chdevs;
716                 uint32 chdevqs;
717                 uint32 chdevjobs;
718                 uint32 connections;
719                 uint32 shares;
720                 uint32 openfiles;
721                 uint32 sessopen;
722                 uint32 sesssvc;
723                 uint32 sessreqs;
724                 uint32 opensearch;
725                 uint32 activelocks;
726                 uint32 numreqbufs;
727                 uint32 sizereqbufs;
728                 uint32 numbigbufs;
729                 uint32 numfiletasks;
730                 uint32 alertsched;
731                 uint32 eroralert;
732                 uint32 logonalert;
733                 uint32 accessalert;
734                 uint32 diskalert;
735                 uint32 netioalert;
736                 uint32 maxaudits;
737                 [string,charset(UTF16)] uint16 *srvheuristics;
738                 uint32 auditedevents;
739                 uint32 auditprofile;
740                 [string,charset(UTF16)] uint16 *autopath;
741         } srvsvc_NetSrvInfo403;
742
743         typedef struct {
744                 uint32 sessopen;
745                 uint32 sesssvc;
746                 uint32 opensearch;
747                 uint32 sizereqbufs;
748                 uint32 initworkitems;
749                 uint32 maxworkitems;
750                 uint32 rawworkitems;
751                 uint32 irpstacksize;
752                 uint32 maxrawbuflen;
753                 uint32 sessusers;
754                 uint32 sessconns;
755                 uint32 maxpagedmemoryusage;
756                 uint32 maxnonpagedmemoryusage;
757                 uint32 enablesoftcompat;
758                 uint32 enableforcedlogoff;
759                 uint32 timesource;
760                 uint32 acceptdownlevelapis;
761                 uint32 lmannounce;
762         } srvsvc_NetSrvInfo502;
763
764         typedef struct{
765                 uint32 sessopen;
766                 uint32 sesssvc;
767                 uint32 opensearch;
768                 uint32 sizereqbufs;
769                 uint32 initworkitems;
770                 uint32 maxworkitems;
771                 uint32 rawworkitems;
772                 uint32 irpstacksize;
773                 uint32 maxrawbuflen;
774                 uint32 sessusers;
775                 uint32 sessconns;
776                 uint32 maxpagedmemoryusage;
777                 uint32 maxnonpagedmemoryusage;
778                 uint32 enablesoftcompat;
779                 uint32 enableforcedlogoff;
780                 uint32 timesource;
781                 uint32 acceptdownlevelapis;
782                 uint32 lmannounce;
783                 [string,charset(UTF16)] uint16 *domain;
784                 uint32 maxcopyreadlen;
785                 uint32 maxcopywritelen;
786                 uint32 minkeepsearch;
787                 uint32 maxkeepsearch;
788                 uint32 minkeepcomplsearch;
789                 uint32 maxkeepcomplsearch;
790                 uint32 threadcountadd;
791                 uint32 numlockthreads;
792                 uint32 scavtimeout;
793                 uint32 minrcvqueue;
794                 uint32 minfreeworkitems;
795                 uint32 xactmemsize;
796                 uint32 threadpriority;
797                 uint32 maxmpxct;
798                 uint32 oplockbreakwait;
799                 uint32 oplockbreakresponsewait;
800                 uint32 enableoplocks;
801                 uint32 enableoplockforceclose;
802                 uint32 enablefcbopens;
803                 uint32 enableraw;
804                 uint32 enablesharednetdrives;
805                 uint32 minfreeconnections;
806                 uint32 maxfreeconnections;
807         } srvsvc_NetSrvInfo503;
808
809         typedef struct{
810                 uint32 sessopen;
811                 uint32 sesssvc;
812                 uint32 opensearch;
813                 uint32 sizereqbufs;
814                 uint32 initworkitems;
815                 uint32 maxworkitems;
816                 uint32 rawworkitems;
817                 uint32 irpstacksize;
818                 uint32 maxrawbuflen;
819                 uint32 sessusers;
820                 uint32 sessconns;
821                 uint32 maxpagedmemoryusage;
822                 uint32 maxnonpagedmemoryusage;
823                 uint32 enablesoftcompat;
824                 uint32 enableforcedlogoff;
825                 uint32 timesource;
826                 uint32 acceptdownlevelapis;
827                 uint32 lmannounce;
828                 [string,charset(UTF16)] uint16 *domain;
829                 uint32 maxcopyreadlen;
830                 uint32 maxcopywritelen;
831                 uint32 minkeepsearch;
832                 uint32 minkeepcomplsearch;
833                 uint32 maxkeepcomplsearch;
834                 uint32 threadcountadd;
835                 uint32 numlockthreads;
836                 uint32 scavtimeout;
837                 uint32 minrcvqueue;
838                 uint32 minfreeworkitems;
839                 uint32 xactmemsize;
840                 uint32 threadpriority;
841                 uint32 maxmpxct;
842                 uint32 oplockbreakwait;
843                 uint32 oplockbreakresponsewait;
844                 uint32 enableoplocks;
845                 uint32 enableoplockforceclose;
846                 uint32 enablefcbopens;
847                 uint32 enableraw;
848                 uint32 enablesharednetdrives;
849                 uint32 minfreeconnections;
850                 uint32 maxfreeconnections;
851                 uint32 initsesstable;
852                 uint32 initconntable;
853                 uint32 initfiletable;
854                 uint32 initsearchtable;
855                 uint32 alertsched;
856                 uint32 errortreshold;
857                 uint32 networkerrortreshold;
858                 uint32 diskspacetreshold;
859                 uint32 reserved;
860                 uint32 maxlinkdelay;
861                 uint32 minlinkthroughput;
862                 uint32 linkinfovalidtime;
863                 uint32 scavqosinfoupdatetime;
864                 uint32 maxworkitemidletime;
865         } srvsvc_NetSrvInfo599;
866
867         typedef struct{
868                 [string,charset(UTF16)] uint16 *comment;
869         } srvsvc_NetSrvInfo1005;
870
871         typedef struct{
872                 uint32 disc;
873         } srvsvc_NetSrvInfo1010;
874
875         typedef struct{
876                 uint32 hidden;
877         } srvsvc_NetSrvInfo1016;
878
879         typedef struct{
880                 uint32 announce;
881         } srvsvc_NetSrvInfo1017;
882
883         typedef struct{
884                 uint32 anndelta;
885         } srvsvc_NetSrvInfo1018;
886
887         typedef struct{
888                 uint32 users;
889         } srvsvc_NetSrvInfo1107;
890
891         typedef struct{
892                 uint32 sessopens;
893         } srvsvc_NetSrvInfo1501;
894
895         typedef struct{
896                 uint32 sessvcs;
897         } srvsvc_NetSrvInfo1502;
898
899         typedef struct{
900                 uint32 opensearch;
901         } srvsvc_NetSrvInfo1503;
902
903         typedef struct{
904                 uint32 maxworkitems;
905         } srvsvc_NetSrvInfo1506;
906
907         typedef struct{
908                 uint32 maxrawbuflen;
909         } srvsvc_NetSrvInfo1509;
910
911         typedef struct{
912                 uint32 sessusers;
913         } srvsvc_NetSrvInfo1510;
914
915         typedef struct{
916                 uint32 sesscons;
917         } srvsvc_NetSrvInfo1511;
918
919         typedef struct{
920                 uint32 maxnonpagedmemoryusage;
921         } srvsvc_NetSrvInfo1512;
922
923         typedef struct{
924                 uint32 maxpagedmemoryusage;
925         } srvsvc_NetSrvInfo1513;
926
927         typedef struct{
928                 uint32 enablesoftcompat;
929         } srvsvc_NetSrvInfo1514;
930
931         typedef struct{
932                 uint32 enableforcedlogoff;
933         } srvsvc_NetSrvInfo1515;
934
935         typedef struct{
936                 uint32 timesource;
937         } srvsvc_NetSrvInfo1516;
938
939         typedef struct{
940                 uint32 lmannounce;
941         } srvsvc_NetSrvInfo1518;
942
943         typedef struct{
944                 uint32 maxcopyreadlen;
945         } srvsvc_NetSrvInfo1520;
946
947         typedef struct{
948                 uint32 maxcopywritelen;
949         } srvsvc_NetSrvInfo1521;
950
951         typedef struct{
952                 uint32 minkeepsearch;
953         } srvsvc_NetSrvInfo1522;
954
955         typedef struct{
956                 uint32 maxkeepsearch;
957         } srvsvc_NetSrvInfo1523;
958
959         typedef struct{
960                 uint32 minkeepcomplsearch;
961         } srvsvc_NetSrvInfo1524;
962
963         typedef struct{
964                 uint32 maxkeepcomplsearch;
965         } srvsvc_NetSrvInfo1525;
966
967         typedef struct{
968                 uint32 scavtimeout;
969         } srvsvc_NetSrvInfo1528;
970
971         typedef struct{
972                 uint32 minrcvqueue;
973         } srvsvc_NetSrvInfo1529;
974
975         typedef struct{
976                 uint32 minfreeworkitems;
977         } srvsvc_NetSrvInfo1530;
978
979         typedef struct{
980                 uint32 maxmpxct;
981         } srvsvc_NetSrvInfo1533;
982
983         typedef struct{
984                 uint32 oplockbreakwait;
985         } srvsvc_NetSrvInfo1534;
986
987         typedef struct{
988                 uint32 oplockbreakresponsewait;
989         } srvsvc_NetSrvInfo1535;
990
991         typedef struct{
992                 uint32 enableoplocks;
993         } srvsvc_NetSrvInfo1536;
994
995         typedef struct{
996                 uint32 enableoplockforceclose;
997         } srvsvc_NetSrvInfo1537;
998
999         typedef struct{
1000                 uint32 enablefcbopens;
1001         } srvsvc_NetSrvInfo1538;
1002
1003         typedef struct{
1004                 uint32 enableraw;
1005         } srvsvc_NetSrvInfo1539;
1006
1007         typedef struct{
1008                 uint32 enablesharednetdrives;
1009         } srvsvc_NetSrvInfo1540;
1010
1011         typedef struct{
1012                 uint32 minfreeconnections;
1013         } srvsvc_NetSrvInfo1541;
1014
1015         typedef struct{
1016                 uint32 maxfreeconnections;
1017         } srvsvc_NetSrvInfo1542;
1018
1019         typedef struct{
1020                 uint32 initsesstable;
1021         } srvsvc_NetSrvInfo1543;
1022
1023         typedef struct{
1024                 uint32 initconntable;
1025         } srvsvc_NetSrvInfo1544;
1026
1027         typedef struct{
1028                 uint32 initfiletable;
1029         } srvsvc_NetSrvInfo1545;
1030
1031         typedef struct{
1032                 uint32 initsearchtable;
1033         } srvsvc_NetSrvInfo1546;
1034
1035         typedef struct{
1036                 uint32 alertsched;
1037         } srvsvc_NetSrvInfo1547;
1038
1039         typedef struct{
1040                 uint32 errortreshold;
1041         } srvsvc_NetSrvInfo1548;
1042
1043         typedef struct{
1044                 uint32 networkerrortreshold;
1045         } srvsvc_NetSrvInfo1549;
1046
1047         typedef struct{
1048                 uint32 diskspacetreshold;
1049         } srvsvc_NetSrvInfo1550;
1050
1051         typedef struct{
1052                 uint32 maxlinkdelay;
1053         } srvsvc_NetSrvInfo1552;
1054
1055         typedef struct{
1056                 uint32 minlinkthroughput;
1057         } srvsvc_NetSrvInfo1553;
1058
1059         typedef struct{
1060                 uint32 linkinfovalidtime;
1061         } srvsvc_NetSrvInfo1554;
1062
1063         typedef struct{
1064                 uint32 scavqosinfoupdatetime;
1065         } srvsvc_NetSrvInfo1555;
1066
1067         typedef struct{
1068                 uint32 maxworkitemidletime;
1069         } srvsvc_NetSrvInfo1556;
1070
1071
1072         typedef union{
1073                 [case(100)]     srvsvc_NetSrvInfo100 *info100;
1074                 [case(101)]     srvsvc_NetSrvInfo101 *info101;
1075                 [case(102)]     srvsvc_NetSrvInfo102 *info102;
1076                 [case(402)]     srvsvc_NetSrvInfo402 *info402;
1077                 [case(403)]     srvsvc_NetSrvInfo403 *info403;
1078                 [case(502)]     srvsvc_NetSrvInfo502 *info502;
1079                 [case(503)]     srvsvc_NetSrvInfo503 *info503;
1080                 [case(599)]     srvsvc_NetSrvInfo599 *info599;
1081                 [case(1005)]    srvsvc_NetSrvInfo1005 *info1005;
1082                 [case(1010)]    srvsvc_NetSrvInfo1010 *info1010;
1083                 [case(1016)]    srvsvc_NetSrvInfo1016 *info1016;
1084                 [case(1017)]    srvsvc_NetSrvInfo1017 *info1017;
1085                 [case(1018)]    srvsvc_NetSrvInfo1018 *info1018;
1086                 [case(1107)]    srvsvc_NetSrvInfo1107 *info1107;
1087                 [case(1501)]    srvsvc_NetSrvInfo1501 *info1501;
1088                 [case(1502)]    srvsvc_NetSrvInfo1502 *info1502;
1089                 [case(1503)]    srvsvc_NetSrvInfo1503 *info1503;
1090                 [case(1506)]    srvsvc_NetSrvInfo1506 *info1506;
1091                 [case(1509)]    srvsvc_NetSrvInfo1509 *info1509;
1092                 [case(1510)]    srvsvc_NetSrvInfo1510 *info1510;
1093                 [case(1511)]    srvsvc_NetSrvInfo1511 *info1511;
1094                 [case(1512)]    srvsvc_NetSrvInfo1512 *info1512;
1095                 [case(1513)]    srvsvc_NetSrvInfo1513 *info1513;
1096                 [case(1514)]    srvsvc_NetSrvInfo1514 *info1514;
1097                 [case(1515)]    srvsvc_NetSrvInfo1515 *info1515;
1098                 [case(1516)]    srvsvc_NetSrvInfo1516 *info1516;
1099                 [case(1518)]    srvsvc_NetSrvInfo1518 *info1518;
1100                 [case(1520)]    srvsvc_NetSrvInfo1520 *info1520;
1101                 [case(1521)]    srvsvc_NetSrvInfo1521 *info1521;
1102                 [case(1522)]    srvsvc_NetSrvInfo1522 *info1522;
1103                 [case(1523)]    srvsvc_NetSrvInfo1523 *info1523;
1104                 [case(1524)]    srvsvc_NetSrvInfo1524 *info1524;
1105                 [case(1525)]    srvsvc_NetSrvInfo1525 *info1525;
1106                 [case(1528)]    srvsvc_NetSrvInfo1528 *info1528;
1107                 [case(1529)]    srvsvc_NetSrvInfo1529 *info1529;
1108                 [case(1530)]    srvsvc_NetSrvInfo1530 *info1530;
1109                 [case(1533)]    srvsvc_NetSrvInfo1533 *info1533;
1110                 [case(1534)]    srvsvc_NetSrvInfo1534 *info1534;
1111                 [case(1535)]    srvsvc_NetSrvInfo1535 *info1535;
1112                 [case(1536)]    srvsvc_NetSrvInfo1536 *info1536;
1113                 [case(1537)]    srvsvc_NetSrvInfo1537 *info1537;
1114                 [case(1538)]    srvsvc_NetSrvInfo1538 *info1538;
1115                 [case(1539)]    srvsvc_NetSrvInfo1539 *info1539;
1116                 [case(1540)]    srvsvc_NetSrvInfo1540 *info1540;
1117                 [case(1541)]    srvsvc_NetSrvInfo1541 *info1541;
1118                 [case(1542)]    srvsvc_NetSrvInfo1542 *info1542;
1119                 [case(1543)]    srvsvc_NetSrvInfo1543 *info1543;
1120                 [case(1544)]    srvsvc_NetSrvInfo1544 *info1544;
1121                 [case(1545)]    srvsvc_NetSrvInfo1545 *info1545;
1122                 [case(1546)]    srvsvc_NetSrvInfo1546 *info1546;
1123                 [case(1547)]    srvsvc_NetSrvInfo1547 *info1547;
1124                 [case(1548)]    srvsvc_NetSrvInfo1548 *info1548;
1125                 [case(1549)]    srvsvc_NetSrvInfo1549 *info1549;
1126                 [case(1550)]    srvsvc_NetSrvInfo1550 *info1550;
1127                 [case(1552)]    srvsvc_NetSrvInfo1552 *info1552;
1128                 [case(1553)]    srvsvc_NetSrvInfo1553 *info1553;
1129                 [case(1554)]    srvsvc_NetSrvInfo1554 *info1554;
1130                 [case(1555)]    srvsvc_NetSrvInfo1555 *info1555;
1131                 [case(1556)]    srvsvc_NetSrvInfo1556 *info1556;
1132                 [default];
1133         } srvsvc_NetSrvInfo;
1134
1135         /******************/
1136         /* Function: 0x15 */
1137         WERROR srvsvc_NetSrvGetInfo(
1138                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1139                 [in]   uint32 level,
1140                 [out,ref,switch_is(level)] srvsvc_NetSrvInfo *info
1141                 );
1142
1143         /******************/
1144         /* Function: 0x16 */
1145         WERROR srvsvc_NetSrvSetInfo(
1146                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1147                 [in]   uint32 level,
1148                 [in,ref,switch_is(level)] srvsvc_NetSrvInfo *info,
1149                 [in,out,unique]   uint32 *parm_error
1150                 );
1151
1152 /**************************/
1153 /* srvsvc_NetDisk         */
1154 /**************************/
1155         typedef struct {
1156                 /*
1157                  * In theory this should be:
1158                  *      [charset(UTF16),string] uint16 annotation[3]
1159                  * But midl treats this as:
1160                  *      [charset(UTF16),string] uint16 annotation[]
1161                  * and pidl doesn't support this yet
1162                  */
1163                 [value(0)] uint32 __disk_offset;
1164                 [value(strlen(disk)+1)] uint32 __disk_length;
1165                 [charset(UTF16)] uint16 disk[__disk_length];
1166         } srvsvc_NetDiskInfo0;
1167
1168         typedef struct {
1169                 uint32 count;
1170                 [size_is(count), length_is(count)] srvsvc_NetDiskInfo0 *disks;
1171         } srvsvc_NetDiskInfo;
1172
1173         /******************/
1174         /* Function: 0x17 */
1175         WERROR srvsvc_NetDiskEnum(
1176                 [in,unique]      [string,charset(UTF16)] uint16 *server_unc,
1177                 [in]      uint32 level,
1178                 [in,out,ref]  srvsvc_NetDiskInfo *info,
1179                 [in]      uint32 maxlen,
1180                 [out,ref]     uint32 *totalentries,
1181                 [in,out,unique]  uint32 *resume_handle
1182                 );
1183
1184 /**************************/
1185 /* srvsvc_NetStatistics   */
1186 /**************************/
1187         typedef struct {
1188                 uint32 start;
1189                 uint32 fopens;
1190                 uint32 devopens;
1191                 uint32 jobsqueued;
1192                 uint32 sopens;
1193                 uint32 stimeouts;
1194                 uint32 serrorout;
1195                 uint32 pwerrors;
1196                 uint32 permerrors;
1197                 uint32 syserrors;
1198                 uint32 bytessent_low;
1199                 uint32 bytessent_high;
1200                 uint32 bytesrcvd_low;
1201                 uint32 bytesrcvd_high;
1202                 uint32 avresponse;
1203                 uint32 reqbufneed;
1204                 uint32 bigbufneed;
1205         } srvsvc_Statistics;
1206
1207         /******************/
1208         /* Function: 0x18 */
1209         WERROR srvsvc_NetServerStatisticsGet(
1210                 [in,unique]      [string,charset(UTF16)] uint16 *server_unc,
1211                 [in,unique]      [string,charset(UTF16)] uint16 *service,
1212                 [in]      uint32 level,
1213                 [in]      uint32 options,
1214                 [out,ref]     srvsvc_Statistics **stats
1215                 );
1216
1217 /**************************/
1218 /* srvsvc_NetTransport    */
1219 /**************************/
1220         typedef struct {
1221                 uint32 vcs;
1222                 [string,charset(UTF16)] uint16 *name;
1223                 [size_is(addr_len)] uint8 *addr;
1224                 uint32 addr_len;
1225                 [string,charset(UTF16)] uint16 *net_addr;
1226         } srvsvc_NetTransportInfo0;
1227
1228         /******************/
1229         /* Function: 0x19 */
1230         WERROR srvsvc_NetTransportAdd(
1231                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1232                 [in] uint32 level,
1233                 [in,switch_is(level)]   srvsvc_NetTransportInfo info
1234                 );
1235
1236         typedef struct {
1237                 uint32 count;
1238                 [size_is(count)] srvsvc_NetTransportInfo0 *array;
1239         } srvsvc_NetTransportCtr0;
1240
1241         typedef struct {
1242                 uint32 vcs;
1243                 [string,charset(UTF16)] uint16 *name;
1244                 [size_is(addr_len)] uint8 *addr;
1245                 uint32 addr_len;
1246                 [string,charset(UTF16)] uint16 *net_addr;
1247                 [string,charset(UTF16)] uint16 *domain;
1248         } srvsvc_NetTransportInfo1;
1249
1250         typedef struct {
1251                 uint32 count;
1252                 [size_is(count)] srvsvc_NetTransportInfo1 *array;
1253         } srvsvc_NetTransportCtr1;
1254
1255         typedef struct {
1256                 uint32 vcs;
1257                 [string,charset(UTF16)] uint16 *name;
1258                 [size_is(addr_len)] uint8 *addr;
1259                 uint32 addr_len;
1260                 [string,charset(UTF16)] uint16 *net_addr;
1261                 [string,charset(UTF16)] uint16 *domain;
1262                 uint32 unknown;
1263         } srvsvc_NetTransportInfo2;
1264
1265         typedef struct {
1266                 uint32 count;
1267                 [size_is(count)] srvsvc_NetTransportInfo2 *array;
1268         } srvsvc_NetTransportCtr2;
1269
1270         typedef struct {
1271                 uint32 vcs;
1272                 [string,charset(UTF16)] uint16 *name;
1273                 [size_is(addr_len)] uint8 *addr;
1274                 uint32 addr_len;
1275                 [string,charset(UTF16)] uint16 *net_addr;
1276                 [string,charset(UTF16)] uint16 *domain;
1277                 uint32 unknown1;
1278                 uint32 unknown2;
1279                 uint8 unknown3[256];
1280         } srvsvc_NetTransportInfo3;
1281
1282         typedef struct {
1283                 uint32 count;
1284                 [size_is(count)] srvsvc_NetTransportInfo3 *array;
1285         } srvsvc_NetTransportCtr3;
1286
1287         typedef union {
1288                 [case(0)] srvsvc_NetTransportCtr0 *ctr0;
1289                 [case(1)] srvsvc_NetTransportCtr1 *ctr1;
1290                 [case(2)] srvsvc_NetTransportCtr2 *ctr2;
1291                 [case(3)] srvsvc_NetTransportCtr3 *ctr3;
1292                 [default];
1293         } srvsvc_NetTransportCtr;
1294
1295         typedef struct {
1296                 uint32 level;
1297                 [switch_is(level)] srvsvc_NetTransportCtr ctr;
1298         } srvsvc_NetTransportInfoCtr;
1299
1300         /******************/
1301         /* Function: 0x1a */
1302         WERROR srvsvc_NetTransportEnum(
1303                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1304                 [in,out,ref] srvsvc_NetTransportInfoCtr *transports,
1305                 [in]   uint32 max_buffer,
1306                 [out,ref]   uint32 *totalentries,
1307                 [in,out,unique]   uint32 *resume_handle
1308                 );
1309
1310         /******************/
1311         /* Function: 0x1b */
1312         WERROR srvsvc_NetTransportDel(
1313                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1314                 [in]    uint32 level,
1315                 [in]    srvsvc_NetTransportInfo0 *info0
1316                 );
1317
1318 /**************************/
1319 /* srvsvc_NetRemoteTOD    */
1320 /**************************/
1321         typedef struct {
1322                 uint32 elapsed; /* time(NULL) */
1323                 uint32 msecs; /* milliseconds till system reboot (uptime) */
1324                 uint32 hours;
1325                 uint32 mins;
1326                 uint32 secs;
1327                 uint32 hunds;
1328                 int32 timezone; /* in minutes */
1329                 uint32 tinterval; /* clock tick interval in 0.0001 second units; 310 on windows */
1330                 uint32 day;
1331                 uint32 month;
1332                 uint32 year;
1333                 uint32 weekday;
1334         } srvsvc_NetRemoteTODInfo;
1335
1336         /******************/
1337         /* Function: 0x1c */
1338         WERROR srvsvc_NetRemoteTOD(
1339                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1340                 [out,ref]     srvsvc_NetRemoteTODInfo **info
1341                 );
1342
1343 /**************************/
1344 /* srvsvc_NetServiceBits  */
1345 /**************************/
1346         /******************/
1347         /* Function: 0x1d */
1348         WERROR srvsvc_NetSetServiceBits(
1349                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1350                 [in,unique]   [string,charset(UTF16)] uint16 *transport,
1351                 [in]   uint32 servicebits,
1352                 [in]   uint32 updateimmediately
1353                 );
1354
1355 /**************************/
1356 /* srvsvc_NetPath         */
1357 /**************************/
1358         /******************/
1359         /* Function: 0x1e */
1360         WERROR srvsvc_NetPathType(
1361                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1362                 [in]   [string,charset(UTF16)] uint16 path[],
1363                 [in]   uint32 pathflags,
1364                 [out,ref]   uint32 *pathtype
1365                 );
1366
1367         /******************/
1368         /* Function: 0x1f */
1369         WERROR srvsvc_NetPathCanonicalize(
1370                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1371                 [in]   [string,charset(UTF16)] uint16 path[],
1372                 [out]  [size_is(maxbuf)] uint8 can_path[],
1373                 [in]   uint32 maxbuf,
1374                 [in]   [string,charset(UTF16)] uint16 prefix[],
1375                 [in,out,ref] uint32 *pathtype,
1376                 [in]    uint32 pathflags
1377                 );
1378
1379         /******************/
1380         /* Function: 0x20 */
1381         WERROR srvsvc_NetPathCompare(
1382                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1383                 [in]   [string,charset(UTF16)] uint16 path1[],
1384                 [in]   [string,charset(UTF16)] uint16 path2[],
1385                 [in]    uint32 pathtype,
1386                 [in]    uint32 pathflags
1387                 );
1388
1389 /**************************/
1390 /* srvsvc_NetName         */
1391 /**************************/
1392         /******************/
1393         /* Function: 0x21 */
1394         WERROR srvsvc_NetNameValidate(
1395                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1396                 [in]   [string,charset(UTF16)] uint16 name[],
1397                 [in]    uint32 name_type,
1398                 [in]    uint32 flags
1399                 );
1400
1401         /******************/
1402         /* Function: 0x22 */
1403         [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE(
1404                 );
1405
1406         /******************/
1407         /* Function: 0x23 */
1408         WERROR srvsvc_NetPRNameCompare(
1409                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1410                 [in]   [string,charset(UTF16)] uint16 name1[],
1411                 [in]   [string,charset(UTF16)] uint16 name2[],
1412                 [in]    uint32 name_type,
1413                 [in]    uint32 flags
1414                 );
1415
1416 /**************************/
1417 /* srvsvc_NetShare ...    */
1418 /**************************/
1419         /******************/
1420         /* Function: 0x24 */
1421         /* Note, there must be some way to return entries read vs 
1422            total entries ... */
1423         WERROR srvsvc_NetShareEnum(
1424                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1425                 [in,out]   uint32 level,
1426                 [in,out,switch_is(level)]   srvsvc_NetShareCtr ctr,
1427                 [in]       uint32 max_buffer,
1428                 [out]      uint32 totalentries,
1429                 [in,out,unique]   uint32 *resume_handle
1430                 );
1431
1432         /******************/
1433         /* Function: 0x25 */
1434         WERROR srvsvc_NetShareDelStart(
1435                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1436                 [in]       [string,charset(UTF16)] uint16 share[],
1437                 [in]       uint32 reserved,
1438                 [out,unique] policy_handle *hnd
1439                 );
1440
1441         /******************/
1442         /* Function: 0x26 */
1443         WERROR srvsvc_NetShareDelCommit(
1444                 [in, out,unique] policy_handle *hnd
1445                 );
1446
1447         /******************/
1448         /* Function: 0x27 */
1449         WERROR srvsvc_NetGetFileSecurity(
1450                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1451                 [in,unique]       [string,charset(UTF16)] uint16 *share,
1452                 [in]       [string,charset(UTF16)] uint16 file[],
1453                 [in]       security_secinfo securityinformation,
1454                 [out,ref]  sec_desc_buf **sd_buf
1455                 );
1456
1457         /******************/
1458         /* Function: 0x28 */
1459         WERROR srvsvc_NetSetFileSecurity(
1460                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1461                 [in,unique]       [string,charset(UTF16)] uint16 *share,
1462                 [in]       [string,charset(UTF16)] uint16 file[],
1463                 [in]       security_secinfo securityinformation,
1464                 [in,ref]   sec_desc_buf *sd_buf
1465                 );
1466
1467
1468
1469         typedef [switch_type(uint32)] union {
1470                 [case(0)] srvsvc_NetTransportInfo0 info0;
1471                 [case(1)] srvsvc_NetTransportInfo1 info1;
1472                 [case(2)] srvsvc_NetTransportInfo2 info2;
1473                 [case(3)] srvsvc_NetTransportInfo3 info3;
1474         } srvsvc_NetTransportInfo;
1475
1476         /******************/
1477         /* Function: 0x29 */
1478         WERROR srvsvc_NetServerTransportAddEx(
1479                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1480                 [in] uint32 level,
1481                 [in,switch_is(level)]   srvsvc_NetTransportInfo info
1482                 );
1483
1484         /******************/
1485         /* Function: 0x2a */
1486         WERROR srvsvc_NetServerSetServiceBitsEx(
1487                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1488                 [in,unique]   [string,charset(UTF16)] uint16 *emulated_server_unc,
1489                 [in,unique]   [string,charset(UTF16)] uint16 *transport,
1490                 [in]   uint32 servicebitsofinterest,
1491                 [in]   uint32 servicebits,
1492                 [in]   uint32 updateimmediately
1493                 );
1494
1495         /******************/
1496         /* Function: 0x2b */
1497         [todo] WERROR srvsvc_NETRDFSGETVERSION(
1498                 );
1499
1500         /******************/
1501         /* Function: 0x2c */
1502         [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
1503                 );
1504
1505         /******************/
1506         /* Function: 0x2d */
1507         [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
1508                 );
1509
1510         /******************/
1511         /* Function: 0x2e */
1512         [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
1513                 );
1514
1515         /******************/
1516         /* Function: 0x2f */
1517         [todo] WERROR srvsvc_NETRDFSSETSERVERINFO(
1518                 );
1519
1520         /******************/
1521         /* Function: 0x30 */
1522         [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT(
1523                 );
1524
1525         /******************/
1526         /* Function: 0x31 */
1527         [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT(
1528                 );
1529
1530         /******************/
1531         /* Function: 0x32 */
1532         [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX(
1533                 );
1534
1535         /******************/
1536         /* Function: 0x33 */
1537         [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
1538                 );
1539
1540         /******************/
1541         /* Function: 0x34 */
1542         [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
1543                 );
1544
1545         /******************/
1546         /* Function: 0x35 */
1547         [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
1548                 );
1549 }