a3b46c218a1a8450d590db9f63bc86bd704f5a09
[samba.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]   uint32 level,
384                 [in,out,switch_is(level)]   srvsvc_NetSessCtr ctr,
385                 [in]   uint32 max_buffer,
386                 [out]   uint32 totalentries,
387                 [in,out,unique]   uint32 *resume_handle
388                 );
389
390         /******************/
391         /* Function: 0x0d */
392         WERROR srvsvc_NetSessDel(
393                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
394                 [in,unique]   [string,charset(UTF16)] uint16 *client,
395                 [in,unique]   [string,charset(UTF16)] uint16 *user
396                 );
397
398 /**************************/
399 /* srvsvc_NetShare        */
400 /**************************/
401
402         /* share types */
403         const uint32 STYPE_TEMPORARY = 0x40000000; /* share is a temporary one */
404         const uint32 STYPE_HIDDEN    = 0x80000000; /* share is a hidden one */
405
406         typedef [v1_enum, flag(NDR_PAHEX)] enum {
407                 STYPE_DISKTREE = 0,
408                 STYPE_DISKTREE_TEMPORARY = STYPE_DISKTREE|STYPE_TEMPORARY,
409                 STYPE_DISKTREE_HIDDEN    = STYPE_DISKTREE|STYPE_HIDDEN,
410                 STYPE_PRINTQ   = 1,
411                 STYPE_PRINTQ_TEMPORARY = STYPE_PRINTQ|STYPE_TEMPORARY,
412                 STYPE_PRINTQ_HIDDEN    = STYPE_PRINTQ|STYPE_HIDDEN,
413                 STYPE_DEVICE   = 2,     /* Serial device */
414                 STYPE_DEVICE_TEMPORARY = STYPE_DEVICE|STYPE_TEMPORARY,
415                 STYPE_DEVICE_HIDDEN    = STYPE_DEVICE|STYPE_HIDDEN,
416                 STYPE_IPC      = 3,     /* Interprocess communication (IPC) */
417                 STYPE_IPC_TEMPORARY = STYPE_IPC|STYPE_TEMPORARY,
418                 STYPE_IPC_HIDDEN    = STYPE_IPC|STYPE_HIDDEN
419         } srvsvc_ShareType;
420
421         typedef struct {
422                 [string,charset(UTF16)] uint16 *name;
423         } srvsvc_NetShareInfo0;
424
425         typedef struct {
426                 uint32 count;
427                 [size_is(count)] srvsvc_NetShareInfo0 *array;
428         } srvsvc_NetShareCtr0;
429
430         typedef struct {
431                 [string,charset(UTF16)] uint16 *name;
432                 srvsvc_ShareType type;
433                 [string,charset(UTF16)] uint16 *comment;
434         } srvsvc_NetShareInfo1;
435
436         typedef struct {
437                 uint32 count;
438                 [size_is(count)] srvsvc_NetShareInfo1 *array;
439         } srvsvc_NetShareCtr1;
440
441         typedef struct {
442                 [string,charset(UTF16)] uint16 *name;
443                 srvsvc_ShareType type;
444                 [string,charset(UTF16)] uint16 *comment;
445                 uint32 permissions;
446                 uint32 max_users;
447                 uint32 current_users;
448                 [string,charset(UTF16)] uint16 *path;
449                 [string,charset(UTF16)] uint16 *password;
450         } srvsvc_NetShareInfo2;
451
452         typedef struct {
453                 uint32 count;
454                 [size_is(count)] srvsvc_NetShareInfo2 *array;
455         } srvsvc_NetShareCtr2;
456
457         typedef struct {
458                 [string,charset(UTF16)] uint16 *name;
459                 srvsvc_ShareType type;
460                 [string,charset(UTF16)] uint16 *comment;
461                 uint32 csc_policy;
462         } srvsvc_NetShareInfo501;
463
464         typedef struct {
465                 uint32 count;
466                 [size_is(count)] srvsvc_NetShareInfo501 *array;
467         } srvsvc_NetShareCtr501;
468
469         typedef struct {
470                 [string,charset(UTF16)] uint16 *name;
471                 srvsvc_ShareType type;
472                 [string,charset(UTF16)] uint16 *comment;
473                 uint32 permissions;
474                 uint32 max_users;
475                 uint32 current_users;
476                 [string,charset(UTF16)] uint16 *path;
477                 [string,charset(UTF16)] uint16 *password;
478                 sec_desc_buf sd_buf;
479         } srvsvc_NetShareInfo502;
480
481         typedef struct {
482                 uint32 count;
483                 [size_is(count)] srvsvc_NetShareInfo502 *array;
484         } srvsvc_NetShareCtr502;
485
486         typedef struct {
487                 [string,charset(UTF16)] uint16 *comment;
488         } srvsvc_NetShareInfo1004;
489
490         typedef struct {
491                 uint32 count;
492                 [size_is(count)] srvsvc_NetShareInfo1004 *array;
493         } srvsvc_NetShareCtr1004;
494
495         typedef bitmap {
496                 SHARE_1005_IN_DFS               = 0x00000001,
497                 SHARE_1005_DFS_ROOT             = 0x00000002
498         } NetShareInfo1005Flags;
499         
500         const uint32 SHARE_1005_CSC_POLICY_MASK = 0x00000030;
501         const uint32 SHARE_1005_CSC_POLICY_SHIFT = 4;
502
503         typedef struct {
504                 NetShareInfo1005Flags dfs_flags;
505         } srvsvc_NetShareInfo1005;
506
507         typedef struct {
508                 uint32 count;
509                 [size_is(count)] srvsvc_NetShareInfo1005 *array;
510         } srvsvc_NetShareCtr1005;
511
512         typedef struct {
513                 uint32 max_users;
514         } srvsvc_NetShareInfo1006;
515
516         typedef struct {
517                 uint32 count;
518                 [size_is(count)] srvsvc_NetShareInfo1006 *array;
519         } srvsvc_NetShareCtr1006;
520
521         typedef struct {
522                 uint32 flags;
523                 [string,charset(UTF16)] uint16 *alternate_directory_name;
524         } srvsvc_NetShareInfo1007;
525
526         typedef struct {
527                 uint32 count;
528                 [size_is(count)] srvsvc_NetShareInfo1007 *array;
529         } srvsvc_NetShareCtr1007;
530
531         typedef struct {
532                 uint32 count;
533                 [size_is(count)] sec_desc_buf *array;
534         } srvsvc_NetShareCtr1501;
535
536         typedef union {
537                 [case(0)] srvsvc_NetShareInfo0 *info0;
538                 [case(1)] srvsvc_NetShareInfo1 *info1;
539                 [case(2)] srvsvc_NetShareInfo2 *info2;
540                 [case(501)] srvsvc_NetShareInfo501 *info501;
541                 [case(502)] srvsvc_NetShareInfo502 *info502;
542                 [case(1004)] srvsvc_NetShareInfo1004 *info1004;
543                 [case(1005)] srvsvc_NetShareInfo1005 *info1005;
544                 [case(1006)] srvsvc_NetShareInfo1006 *info1006;
545                 [case(1007)] srvsvc_NetShareInfo1007 *info1007;
546                 [case(1501)] sec_desc_buf *info1501;
547                 [default] ;
548         } srvsvc_NetShareInfo;
549
550         typedef union {
551                 [case(0)] srvsvc_NetShareCtr0 *ctr0;
552                 [case(1)] srvsvc_NetShareCtr1 *ctr1;
553                 [case(2)] srvsvc_NetShareCtr2 *ctr2;
554                 [case(501)] srvsvc_NetShareCtr501 *ctr501;
555                 [case(502)] srvsvc_NetShareCtr502 *ctr502;
556                 [case(1004)] srvsvc_NetShareCtr1004 *ctr1004;
557                 [case(1005)] srvsvc_NetShareCtr1005 *ctr1005;
558                 [case(1006)] srvsvc_NetShareCtr1006 *ctr1006;
559                 [case(1007)] srvsvc_NetShareCtr1007 *ctr1007;
560                 [case(1501)] srvsvc_NetShareCtr1501 *ctr1501;
561                 [default] ;
562         } srvsvc_NetShareCtr;
563
564         typedef struct {
565                 uint32 level;
566                 [switch_is(level)] srvsvc_NetShareCtr ctr;
567         } srvsvc_NetShareInfoCtr;
568
569         /******************/
570         /* Function: 0x0e */
571         WERROR srvsvc_NetShareAdd(
572                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
573                 [in]   uint32 level,
574                 [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
575                 [in,out,unique]   uint32 *parm_error
576                 );
577
578         /******************/
579         /* Function: 0x0f */
580         WERROR srvsvc_NetShareEnumAll (
581                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
582                 [in,out]   uint32 level,
583                 [in,out,switch_is(level)] srvsvc_NetShareCtr ctr,
584                 [in]   uint32 max_buffer,
585                 [out]  uint32 totalentries,
586                 [in,out,unique]   uint32 *resume_handle
587                 );
588
589         /******************/
590         /* Function: 0x10 */
591         WERROR srvsvc_NetShareGetInfo(
592                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
593                 [in]   [string,charset(UTF16)] uint16 share_name[],
594                 [in]   uint32 level,
595                 [out,ref,switch_is(level)] srvsvc_NetShareInfo *info
596                 );
597
598         /******************/
599         /* Function: 0x11 */
600         WERROR srvsvc_NetShareSetInfo(
601                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
602                 [in]   [string,charset(UTF16)] uint16 share_name[],
603                 [in]   uint32 level,
604                 [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
605                 [in,out,unique]   uint32 *parm_error
606                 );
607
608         /******************/
609         /* Function: 0x12 */
610         WERROR srvsvc_NetShareDel(
611                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
612                 [in]   [string,charset(UTF16)] uint16 share_name[],
613                 [in]   uint32 reserved
614                 );
615
616         /******************/
617         /* Function: 0x13 */
618         WERROR srvsvc_NetShareDelSticky(
619                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
620                 [in]   [string,charset(UTF16)] uint16 share_name[],
621                 [in]   uint32 reserved
622                 );
623         
624         /******************/
625         /* Function: 0x14 */
626         WERROR srvsvc_NetShareCheck(
627                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
628                 [in]   [string,charset(UTF16)] uint16 device_name[],
629                 [out,ref]  srvsvc_ShareType *type
630                 );
631
632 /**************************/
633 /* srvsvc_NetSrv          */
634 /**************************/
635         typedef [public,v1_enum] enum {
636                 PLATFORM_ID_DOS = 300,
637                 PLATFORM_ID_OS2 = 400,
638                 PLATFORM_ID_NT  = 500,
639                 PLATFORM_ID_OSF = 600,
640                 PLATFORM_ID_VMS = 700
641         } srvsvc_PlatformId;
642
643         typedef struct {
644                 srvsvc_PlatformId platform_id;
645                 [string,charset(UTF16)] uint16 *server_name;
646         } srvsvc_NetSrvInfo100;
647
648         typedef struct {
649                 srvsvc_PlatformId platform_id;
650                 [string,charset(UTF16)] uint16 *server_name;
651                 uint32 version_major;
652                 uint32 version_minor;
653                 svcctl_ServerType server_type;
654                 [string,charset(UTF16)] uint16 *comment;
655         } srvsvc_NetSrvInfo101;
656
657         typedef struct {
658                 srvsvc_PlatformId platform_id;
659                 [string,charset(UTF16)] uint16 *server_name;
660                 uint32 version_major;
661                 uint32 version_minor;
662                 svcctl_ServerType server_type;
663                 [string,charset(UTF16)] uint16 *comment;
664                 uint32 users;
665                 uint32 disc;
666                 uint32 hidden;
667                 uint32 announce;
668                 uint32 anndelta;
669                 uint32 licenses;
670                 [string,charset(UTF16)] uint16 *userpath;
671         } srvsvc_NetSrvInfo102;
672
673         typedef struct {
674                 uint32 ulist_mtime;
675                 uint32 glist_mtime;
676                 uint32 alist_mtime;
677                 [string,charset(UTF16)] uint16 *alerts;
678                 uint32 security;
679                 uint32 numadmin;
680                 uint32 lanmask;
681                 [string,charset(UTF16)] uint16 *guestaccount;
682                 uint32 chdevs;
683                 uint32 chdevqs;
684                 uint32 chdevjobs;
685                 uint32 connections;
686                 uint32 shares;
687                 uint32 openfiles;
688                 uint32 sessopen;
689                 uint32 sesssvc;
690                 uint32 sessreqs;
691                 uint32 opensearch;
692                 uint32 activelocks;
693                 uint32 numreqbufs;
694                 uint32 sizereqbufs;
695                 uint32 numbigbufs;
696                 uint32 numfiletasks;
697                 uint32 alertsched;
698                 uint32 erroralert;
699                 uint32 logonalert;
700                 uint32 accessalert;
701                 uint32 diskalert;
702                 uint32 netioalert;
703                 uint32 maxaudits;
704                 [string,charset(UTF16)] uint16 *srvheuristics;
705         } srvsvc_NetSrvInfo402;
706
707         typedef struct {
708                 uint32 ulist_mtime;
709                 uint32 glist_mtime;
710                 uint32 alist_mtime;
711                 [string,charset(UTF16)] uint16 *alerts;
712                 uint32 security;
713                 uint32 numadmin;
714                 uint32 lanmask;
715                 [string,charset(UTF16)] uint16 *guestaccount;
716                 uint32 chdevs;
717                 uint32 chdevqs;
718                 uint32 chdevjobs;
719                 uint32 connections;
720                 uint32 shares;
721                 uint32 openfiles;
722                 uint32 sessopen;
723                 uint32 sesssvc;
724                 uint32 sessreqs;
725                 uint32 opensearch;
726                 uint32 activelocks;
727                 uint32 numreqbufs;
728                 uint32 sizereqbufs;
729                 uint32 numbigbufs;
730                 uint32 numfiletasks;
731                 uint32 alertsched;
732                 uint32 eroralert;
733                 uint32 logonalert;
734                 uint32 accessalert;
735                 uint32 diskalert;
736                 uint32 netioalert;
737                 uint32 maxaudits;
738                 [string,charset(UTF16)] uint16 *srvheuristics;
739                 uint32 auditedevents;
740                 uint32 auditprofile;
741                 [string,charset(UTF16)] uint16 *autopath;
742         } srvsvc_NetSrvInfo403;
743
744         typedef struct {
745                 uint32 sessopen;
746                 uint32 sesssvc;
747                 uint32 opensearch;
748                 uint32 sizereqbufs;
749                 uint32 initworkitems;
750                 uint32 maxworkitems;
751                 uint32 rawworkitems;
752                 uint32 irpstacksize;
753                 uint32 maxrawbuflen;
754                 uint32 sessusers;
755                 uint32 sessconns;
756                 uint32 maxpagedmemoryusage;
757                 uint32 maxnonpagedmemoryusage;
758                 uint32 enablesoftcompat;
759                 uint32 enableforcedlogoff;
760                 uint32 timesource;
761                 uint32 acceptdownlevelapis;
762                 uint32 lmannounce;
763         } srvsvc_NetSrvInfo502;
764
765         typedef struct{
766                 uint32 sessopen;
767                 uint32 sesssvc;
768                 uint32 opensearch;
769                 uint32 sizereqbufs;
770                 uint32 initworkitems;
771                 uint32 maxworkitems;
772                 uint32 rawworkitems;
773                 uint32 irpstacksize;
774                 uint32 maxrawbuflen;
775                 uint32 sessusers;
776                 uint32 sessconns;
777                 uint32 maxpagedmemoryusage;
778                 uint32 maxnonpagedmemoryusage;
779                 uint32 enablesoftcompat;
780                 uint32 enableforcedlogoff;
781                 uint32 timesource;
782                 uint32 acceptdownlevelapis;
783                 uint32 lmannounce;
784                 [string,charset(UTF16)] uint16 *domain;
785                 uint32 maxcopyreadlen;
786                 uint32 maxcopywritelen;
787                 uint32 minkeepsearch;
788                 uint32 maxkeepsearch;
789                 uint32 minkeepcomplsearch;
790                 uint32 maxkeepcomplsearch;
791                 uint32 threadcountadd;
792                 uint32 numlockthreads;
793                 uint32 scavtimeout;
794                 uint32 minrcvqueue;
795                 uint32 minfreeworkitems;
796                 uint32 xactmemsize;
797                 uint32 threadpriority;
798                 uint32 maxmpxct;
799                 uint32 oplockbreakwait;
800                 uint32 oplockbreakresponsewait;
801                 uint32 enableoplocks;
802                 uint32 enableoplockforceclose;
803                 uint32 enablefcbopens;
804                 uint32 enableraw;
805                 uint32 enablesharednetdrives;
806                 uint32 minfreeconnections;
807                 uint32 maxfreeconnections;
808         } srvsvc_NetSrvInfo503;
809
810         typedef struct{
811                 uint32 sessopen;
812                 uint32 sesssvc;
813                 uint32 opensearch;
814                 uint32 sizereqbufs;
815                 uint32 initworkitems;
816                 uint32 maxworkitems;
817                 uint32 rawworkitems;
818                 uint32 irpstacksize;
819                 uint32 maxrawbuflen;
820                 uint32 sessusers;
821                 uint32 sessconns;
822                 uint32 maxpagedmemoryusage;
823                 uint32 maxnonpagedmemoryusage;
824                 uint32 enablesoftcompat;
825                 uint32 enableforcedlogoff;
826                 uint32 timesource;
827                 uint32 acceptdownlevelapis;
828                 uint32 lmannounce;
829                 [string,charset(UTF16)] uint16 *domain;
830                 uint32 maxcopyreadlen;
831                 uint32 maxcopywritelen;
832                 uint32 minkeepsearch;
833                 uint32 minkeepcomplsearch;
834                 uint32 maxkeepcomplsearch;
835                 uint32 threadcountadd;
836                 uint32 numlockthreads;
837                 uint32 scavtimeout;
838                 uint32 minrcvqueue;
839                 uint32 minfreeworkitems;
840                 uint32 xactmemsize;
841                 uint32 threadpriority;
842                 uint32 maxmpxct;
843                 uint32 oplockbreakwait;
844                 uint32 oplockbreakresponsewait;
845                 uint32 enableoplocks;
846                 uint32 enableoplockforceclose;
847                 uint32 enablefcbopens;
848                 uint32 enableraw;
849                 uint32 enablesharednetdrives;
850                 uint32 minfreeconnections;
851                 uint32 maxfreeconnections;
852                 uint32 initsesstable;
853                 uint32 initconntable;
854                 uint32 initfiletable;
855                 uint32 initsearchtable;
856                 uint32 alertsched;
857                 uint32 errortreshold;
858                 uint32 networkerrortreshold;
859                 uint32 diskspacetreshold;
860                 uint32 reserved;
861                 uint32 maxlinkdelay;
862                 uint32 minlinkthroughput;
863                 uint32 linkinfovalidtime;
864                 uint32 scavqosinfoupdatetime;
865                 uint32 maxworkitemidletime;
866         } srvsvc_NetSrvInfo599;
867
868         typedef struct{
869                 [string,charset(UTF16)] uint16 *comment;
870         } srvsvc_NetSrvInfo1005;
871
872         typedef struct{
873                 uint32 disc;
874         } srvsvc_NetSrvInfo1010;
875
876         typedef struct{
877                 uint32 hidden;
878         } srvsvc_NetSrvInfo1016;
879
880         typedef struct{
881                 uint32 announce;
882         } srvsvc_NetSrvInfo1017;
883
884         typedef struct{
885                 uint32 anndelta;
886         } srvsvc_NetSrvInfo1018;
887
888         typedef struct{
889                 uint32 users;
890         } srvsvc_NetSrvInfo1107;
891
892         typedef struct{
893                 uint32 sessopens;
894         } srvsvc_NetSrvInfo1501;
895
896         typedef struct{
897                 uint32 sessvcs;
898         } srvsvc_NetSrvInfo1502;
899
900         typedef struct{
901                 uint32 opensearch;
902         } srvsvc_NetSrvInfo1503;
903
904         typedef struct{
905                 uint32 maxworkitems;
906         } srvsvc_NetSrvInfo1506;
907
908         typedef struct{
909                 uint32 maxrawbuflen;
910         } srvsvc_NetSrvInfo1509;
911
912         typedef struct{
913                 uint32 sessusers;
914         } srvsvc_NetSrvInfo1510;
915
916         typedef struct{
917                 uint32 sesscons;
918         } srvsvc_NetSrvInfo1511;
919
920         typedef struct{
921                 uint32 maxnonpagedmemoryusage;
922         } srvsvc_NetSrvInfo1512;
923
924         typedef struct{
925                 uint32 maxpagedmemoryusage;
926         } srvsvc_NetSrvInfo1513;
927
928         typedef struct{
929                 uint32 enablesoftcompat;
930         } srvsvc_NetSrvInfo1514;
931
932         typedef struct{
933                 uint32 enableforcedlogoff;
934         } srvsvc_NetSrvInfo1515;
935
936         typedef struct{
937                 uint32 timesource;
938         } srvsvc_NetSrvInfo1516;
939
940         typedef struct{
941                 uint32 lmannounce;
942         } srvsvc_NetSrvInfo1518;
943
944         typedef struct{
945                 uint32 maxcopyreadlen;
946         } srvsvc_NetSrvInfo1520;
947
948         typedef struct{
949                 uint32 maxcopywritelen;
950         } srvsvc_NetSrvInfo1521;
951
952         typedef struct{
953                 uint32 minkeepsearch;
954         } srvsvc_NetSrvInfo1522;
955
956         typedef struct{
957                 uint32 maxkeepsearch;
958         } srvsvc_NetSrvInfo1523;
959
960         typedef struct{
961                 uint32 minkeepcomplsearch;
962         } srvsvc_NetSrvInfo1524;
963
964         typedef struct{
965                 uint32 maxkeepcomplsearch;
966         } srvsvc_NetSrvInfo1525;
967
968         typedef struct{
969                 uint32 scavtimeout;
970         } srvsvc_NetSrvInfo1528;
971
972         typedef struct{
973                 uint32 minrcvqueue;
974         } srvsvc_NetSrvInfo1529;
975
976         typedef struct{
977                 uint32 minfreeworkitems;
978         } srvsvc_NetSrvInfo1530;
979
980         typedef struct{
981                 uint32 maxmpxct;
982         } srvsvc_NetSrvInfo1533;
983
984         typedef struct{
985                 uint32 oplockbreakwait;
986         } srvsvc_NetSrvInfo1534;
987
988         typedef struct{
989                 uint32 oplockbreakresponsewait;
990         } srvsvc_NetSrvInfo1535;
991
992         typedef struct{
993                 uint32 enableoplocks;
994         } srvsvc_NetSrvInfo1536;
995
996         typedef struct{
997                 uint32 enableoplockforceclose;
998         } srvsvc_NetSrvInfo1537;
999
1000         typedef struct{
1001                 uint32 enablefcbopens;
1002         } srvsvc_NetSrvInfo1538;
1003
1004         typedef struct{
1005                 uint32 enableraw;
1006         } srvsvc_NetSrvInfo1539;
1007
1008         typedef struct{
1009                 uint32 enablesharednetdrives;
1010         } srvsvc_NetSrvInfo1540;
1011
1012         typedef struct{
1013                 uint32 minfreeconnections;
1014         } srvsvc_NetSrvInfo1541;
1015
1016         typedef struct{
1017                 uint32 maxfreeconnections;
1018         } srvsvc_NetSrvInfo1542;
1019
1020         typedef struct{
1021                 uint32 initsesstable;
1022         } srvsvc_NetSrvInfo1543;
1023
1024         typedef struct{
1025                 uint32 initconntable;
1026         } srvsvc_NetSrvInfo1544;
1027
1028         typedef struct{
1029                 uint32 initfiletable;
1030         } srvsvc_NetSrvInfo1545;
1031
1032         typedef struct{
1033                 uint32 initsearchtable;
1034         } srvsvc_NetSrvInfo1546;
1035
1036         typedef struct{
1037                 uint32 alertsched;
1038         } srvsvc_NetSrvInfo1547;
1039
1040         typedef struct{
1041                 uint32 errortreshold;
1042         } srvsvc_NetSrvInfo1548;
1043
1044         typedef struct{
1045                 uint32 networkerrortreshold;
1046         } srvsvc_NetSrvInfo1549;
1047
1048         typedef struct{
1049                 uint32 diskspacetreshold;
1050         } srvsvc_NetSrvInfo1550;
1051
1052         typedef struct{
1053                 uint32 maxlinkdelay;
1054         } srvsvc_NetSrvInfo1552;
1055
1056         typedef struct{
1057                 uint32 minlinkthroughput;
1058         } srvsvc_NetSrvInfo1553;
1059
1060         typedef struct{
1061                 uint32 linkinfovalidtime;
1062         } srvsvc_NetSrvInfo1554;
1063
1064         typedef struct{
1065                 uint32 scavqosinfoupdatetime;
1066         } srvsvc_NetSrvInfo1555;
1067
1068         typedef struct{
1069                 uint32 maxworkitemidletime;
1070         } srvsvc_NetSrvInfo1556;
1071
1072
1073         typedef union{
1074                 [case(100)]     srvsvc_NetSrvInfo100 *info100;
1075                 [case(101)]     srvsvc_NetSrvInfo101 *info101;
1076                 [case(102)]     srvsvc_NetSrvInfo102 *info102;
1077                 [case(402)]     srvsvc_NetSrvInfo402 *info402;
1078                 [case(403)]     srvsvc_NetSrvInfo403 *info403;
1079                 [case(502)]     srvsvc_NetSrvInfo502 *info502;
1080                 [case(503)]     srvsvc_NetSrvInfo503 *info503;
1081                 [case(599)]     srvsvc_NetSrvInfo599 *info599;
1082                 [case(1005)]    srvsvc_NetSrvInfo1005 *info1005;
1083                 [case(1010)]    srvsvc_NetSrvInfo1010 *info1010;
1084                 [case(1016)]    srvsvc_NetSrvInfo1016 *info1016;
1085                 [case(1017)]    srvsvc_NetSrvInfo1017 *info1017;
1086                 [case(1018)]    srvsvc_NetSrvInfo1018 *info1018;
1087                 [case(1107)]    srvsvc_NetSrvInfo1107 *info1107;
1088                 [case(1501)]    srvsvc_NetSrvInfo1501 *info1501;
1089                 [case(1502)]    srvsvc_NetSrvInfo1502 *info1502;
1090                 [case(1503)]    srvsvc_NetSrvInfo1503 *info1503;
1091                 [case(1506)]    srvsvc_NetSrvInfo1506 *info1506;
1092                 [case(1509)]    srvsvc_NetSrvInfo1509 *info1509;
1093                 [case(1510)]    srvsvc_NetSrvInfo1510 *info1510;
1094                 [case(1511)]    srvsvc_NetSrvInfo1511 *info1511;
1095                 [case(1512)]    srvsvc_NetSrvInfo1512 *info1512;
1096                 [case(1513)]    srvsvc_NetSrvInfo1513 *info1513;
1097                 [case(1514)]    srvsvc_NetSrvInfo1514 *info1514;
1098                 [case(1515)]    srvsvc_NetSrvInfo1515 *info1515;
1099                 [case(1516)]    srvsvc_NetSrvInfo1516 *info1516;
1100                 [case(1518)]    srvsvc_NetSrvInfo1518 *info1518;
1101                 [case(1520)]    srvsvc_NetSrvInfo1520 *info1520;
1102                 [case(1521)]    srvsvc_NetSrvInfo1521 *info1521;
1103                 [case(1522)]    srvsvc_NetSrvInfo1522 *info1522;
1104                 [case(1523)]    srvsvc_NetSrvInfo1523 *info1523;
1105                 [case(1524)]    srvsvc_NetSrvInfo1524 *info1524;
1106                 [case(1525)]    srvsvc_NetSrvInfo1525 *info1525;
1107                 [case(1528)]    srvsvc_NetSrvInfo1528 *info1528;
1108                 [case(1529)]    srvsvc_NetSrvInfo1529 *info1529;
1109                 [case(1530)]    srvsvc_NetSrvInfo1530 *info1530;
1110                 [case(1533)]    srvsvc_NetSrvInfo1533 *info1533;
1111                 [case(1534)]    srvsvc_NetSrvInfo1534 *info1534;
1112                 [case(1535)]    srvsvc_NetSrvInfo1535 *info1535;
1113                 [case(1536)]    srvsvc_NetSrvInfo1536 *info1536;
1114                 [case(1537)]    srvsvc_NetSrvInfo1537 *info1537;
1115                 [case(1538)]    srvsvc_NetSrvInfo1538 *info1538;
1116                 [case(1539)]    srvsvc_NetSrvInfo1539 *info1539;
1117                 [case(1540)]    srvsvc_NetSrvInfo1540 *info1540;
1118                 [case(1541)]    srvsvc_NetSrvInfo1541 *info1541;
1119                 [case(1542)]    srvsvc_NetSrvInfo1542 *info1542;
1120                 [case(1543)]    srvsvc_NetSrvInfo1543 *info1543;
1121                 [case(1544)]    srvsvc_NetSrvInfo1544 *info1544;
1122                 [case(1545)]    srvsvc_NetSrvInfo1545 *info1545;
1123                 [case(1546)]    srvsvc_NetSrvInfo1546 *info1546;
1124                 [case(1547)]    srvsvc_NetSrvInfo1547 *info1547;
1125                 [case(1548)]    srvsvc_NetSrvInfo1548 *info1548;
1126                 [case(1549)]    srvsvc_NetSrvInfo1549 *info1549;
1127                 [case(1550)]    srvsvc_NetSrvInfo1550 *info1550;
1128                 [case(1552)]    srvsvc_NetSrvInfo1552 *info1552;
1129                 [case(1553)]    srvsvc_NetSrvInfo1553 *info1553;
1130                 [case(1554)]    srvsvc_NetSrvInfo1554 *info1554;
1131                 [case(1555)]    srvsvc_NetSrvInfo1555 *info1555;
1132                 [case(1556)]    srvsvc_NetSrvInfo1556 *info1556;
1133                 [default];
1134         } srvsvc_NetSrvInfo;
1135
1136         /******************/
1137         /* Function: 0x15 */
1138         WERROR srvsvc_NetSrvGetInfo(
1139                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1140                 [in]   uint32 level,
1141                 [out,ref,switch_is(level)] srvsvc_NetSrvInfo *info
1142                 );
1143
1144         /******************/
1145         /* Function: 0x16 */
1146         WERROR srvsvc_NetSrvSetInfo(
1147                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1148                 [in]   uint32 level,
1149                 [in,ref,switch_is(level)] srvsvc_NetSrvInfo *info,
1150                 [in,out,unique]   uint32 *parm_error
1151                 );
1152
1153 /**************************/
1154 /* srvsvc_NetDisk         */
1155 /**************************/
1156         typedef struct {
1157                 /*
1158                  * In theory this should be:
1159                  *      [charset(UTF16),string] uint16 annotation[3]
1160                  * But midl treats this as:
1161                  *      [charset(UTF16),string] uint16 annotation[]
1162                  * and pidl doesn't support this yet
1163                  */
1164                 [value(0)] uint32 __disk_offset;
1165                 [value(strlen(disk)+1)] uint32 __disk_length;
1166                 [charset(UTF16)] uint16 disk[__disk_length];
1167         } srvsvc_NetDiskInfo0;
1168
1169         typedef struct {
1170                 uint32 count;
1171                 [size_is(count), length_is(count)] srvsvc_NetDiskInfo0 *disks;
1172         } srvsvc_NetDiskInfo;
1173
1174         /******************/
1175         /* Function: 0x17 */
1176         WERROR srvsvc_NetDiskEnum(
1177                 [in,unique]      [string,charset(UTF16)] uint16 *server_unc,
1178                 [in]      uint32 level,
1179                 [in,out,ref]  srvsvc_NetDiskInfo *info,
1180                 [in]      uint32 maxlen,
1181                 [out,ref]     uint32 *totalentries,
1182                 [in,out,unique]  uint32 *resume_handle
1183                 );
1184
1185 /**************************/
1186 /* srvsvc_NetStatistics   */
1187 /**************************/
1188         typedef struct {
1189                 uint32 start;
1190                 uint32 fopens;
1191                 uint32 devopens;
1192                 uint32 jobsqueued;
1193                 uint32 sopens;
1194                 uint32 stimeouts;
1195                 uint32 serrorout;
1196                 uint32 pwerrors;
1197                 uint32 permerrors;
1198                 uint32 syserrors;
1199                 uint32 bytessent_low;
1200                 uint32 bytessent_high;
1201                 uint32 bytesrcvd_low;
1202                 uint32 bytesrcvd_high;
1203                 uint32 avresponse;
1204                 uint32 reqbufneed;
1205                 uint32 bigbufneed;
1206         } srvsvc_Statistics;
1207
1208         /******************/
1209         /* Function: 0x18 */
1210         WERROR srvsvc_NetServerStatisticsGet(
1211                 [in,unique]      [string,charset(UTF16)] uint16 *server_unc,
1212                 [in,unique]      [string,charset(UTF16)] uint16 *service,
1213                 [in]      uint32 level,
1214                 [in]      uint32 options,
1215                 [out,ref]     srvsvc_Statistics **stats
1216                 );
1217
1218 /**************************/
1219 /* srvsvc_NetTransport    */
1220 /**************************/
1221         typedef struct {
1222                 uint32 vcs;
1223                 [string,charset(UTF16)] uint16 *name;
1224                 [size_is(addr_len)] uint8 *addr;
1225                 uint32 addr_len;
1226                 [string,charset(UTF16)] uint16 *net_addr;
1227         } srvsvc_NetTransportInfo0;
1228
1229         /******************/
1230         /* Function: 0x19 */
1231         WERROR srvsvc_NetTransportAdd(
1232                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1233                 [in] uint32 level,
1234                 [in,switch_is(level)]   srvsvc_NetTransportInfo info
1235                 );
1236
1237         typedef struct {
1238                 uint32 count;
1239                 [size_is(count)] srvsvc_NetTransportInfo0 *array;
1240         } srvsvc_NetTransportCtr0;
1241
1242         typedef struct {
1243                 uint32 vcs;
1244                 [string,charset(UTF16)] uint16 *name;
1245                 [size_is(addr_len)] uint8 *addr;
1246                 uint32 addr_len;
1247                 [string,charset(UTF16)] uint16 *net_addr;
1248                 [string,charset(UTF16)] uint16 *domain;
1249         } srvsvc_NetTransportInfo1;
1250
1251         typedef struct {
1252                 uint32 count;
1253                 [size_is(count)] srvsvc_NetTransportInfo1 *array;
1254         } srvsvc_NetTransportCtr1;
1255
1256         typedef struct {
1257                 uint32 vcs;
1258                 [string,charset(UTF16)] uint16 *name;
1259                 [size_is(addr_len)] uint8 *addr;
1260                 uint32 addr_len;
1261                 [string,charset(UTF16)] uint16 *net_addr;
1262                 [string,charset(UTF16)] uint16 *domain;
1263                 uint32 unknown;
1264         } srvsvc_NetTransportInfo2;
1265
1266         typedef struct {
1267                 uint32 count;
1268                 [size_is(count)] srvsvc_NetTransportInfo2 *array;
1269         } srvsvc_NetTransportCtr2;
1270
1271         typedef struct {
1272                 uint32 vcs;
1273                 [string,charset(UTF16)] uint16 *name;
1274                 [size_is(addr_len)] uint8 *addr;
1275                 uint32 addr_len;
1276                 [string,charset(UTF16)] uint16 *net_addr;
1277                 [string,charset(UTF16)] uint16 *domain;
1278                 uint32 unknown1;
1279                 uint32 unknown2;
1280                 uint8 unknown3[256];
1281         } srvsvc_NetTransportInfo3;
1282
1283         typedef struct {
1284                 uint32 count;
1285                 [size_is(count)] srvsvc_NetTransportInfo3 *array;
1286         } srvsvc_NetTransportCtr3;
1287
1288         typedef union {
1289                 [case(0)] srvsvc_NetTransportCtr0 *ctr0;
1290                 [case(1)] srvsvc_NetTransportCtr1 *ctr1;
1291                 [case(2)] srvsvc_NetTransportCtr2 *ctr2;
1292                 [case(3)] srvsvc_NetTransportCtr3 *ctr3;
1293                 [default];
1294         } srvsvc_NetTransportCtr;
1295
1296         typedef struct {
1297                 uint32 level;
1298                 [switch_is(level)] srvsvc_NetTransportCtr ctr;
1299         } srvsvc_NetTransportInfoCtr;
1300
1301         /******************/
1302         /* Function: 0x1a */
1303         WERROR srvsvc_NetTransportEnum(
1304                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1305                 [in,out,ref] srvsvc_NetTransportInfoCtr *transports,
1306                 [in]   uint32 max_buffer,
1307                 [out,ref]   uint32 *totalentries,
1308                 [in,out,unique]   uint32 *resume_handle
1309                 );
1310
1311         /******************/
1312         /* Function: 0x1b */
1313         WERROR srvsvc_NetTransportDel(
1314                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1315                 [in]    uint32 level,
1316                 [in]    srvsvc_NetTransportInfo0 *info0
1317                 );
1318
1319 /**************************/
1320 /* srvsvc_NetRemoteTOD    */
1321 /**************************/
1322         typedef struct {
1323                 uint32 elapsed; /* time(NULL) */
1324                 uint32 msecs; /* milliseconds till system reboot (uptime) */
1325                 uint32 hours;
1326                 uint32 mins;
1327                 uint32 secs;
1328                 uint32 hunds;
1329                 int32 timezone; /* in minutes */
1330                 uint32 tinterval; /* clock tick interval in 0.0001 second units; 310 on windows */
1331                 uint32 day;
1332                 uint32 month;
1333                 uint32 year;
1334                 uint32 weekday;
1335         } srvsvc_NetRemoteTODInfo;
1336
1337         /******************/
1338         /* Function: 0x1c */
1339         WERROR srvsvc_NetRemoteTOD(
1340                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1341                 [out,ref]     srvsvc_NetRemoteTODInfo **info
1342                 );
1343
1344 /**************************/
1345 /* srvsvc_NetServiceBits  */
1346 /**************************/
1347         /******************/
1348         /* Function: 0x1d */
1349         WERROR srvsvc_NetSetServiceBits(
1350                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1351                 [in,unique]   [string,charset(UTF16)] uint16 *transport,
1352                 [in]   uint32 servicebits,
1353                 [in]   uint32 updateimmediately
1354                 );
1355
1356 /**************************/
1357 /* srvsvc_NetPath         */
1358 /**************************/
1359         /******************/
1360         /* Function: 0x1e */
1361         WERROR srvsvc_NetPathType(
1362                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1363                 [in]   [string,charset(UTF16)] uint16 path[],
1364                 [in]   uint32 pathflags,
1365                 [out,ref]   uint32 *pathtype
1366                 );
1367
1368         /******************/
1369         /* Function: 0x1f */
1370         WERROR srvsvc_NetPathCanonicalize(
1371                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1372                 [in]   [string,charset(UTF16)] uint16 path[],
1373                 [out]  [size_is(maxbuf)] uint8 can_path[],
1374                 [in]   uint32 maxbuf,
1375                 [in]   [string,charset(UTF16)] uint16 prefix[],
1376                 [in,out,ref] uint32 *pathtype,
1377                 [in]    uint32 pathflags
1378                 );
1379
1380         /******************/
1381         /* Function: 0x20 */
1382         WERROR srvsvc_NetPathCompare(
1383                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1384                 [in]   [string,charset(UTF16)] uint16 path1[],
1385                 [in]   [string,charset(UTF16)] uint16 path2[],
1386                 [in]    uint32 pathtype,
1387                 [in]    uint32 pathflags
1388                 );
1389
1390 /**************************/
1391 /* srvsvc_NetName         */
1392 /**************************/
1393         /******************/
1394         /* Function: 0x21 */
1395         WERROR srvsvc_NetNameValidate(
1396                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1397                 [in]   [string,charset(UTF16)] uint16 name[],
1398                 [in]    uint32 name_type,
1399                 [in]    uint32 flags
1400                 );
1401
1402         /******************/
1403         /* Function: 0x22 */
1404         [todo] WERROR srvsvc_NETRPRNAMECANONICALIZE(
1405                 );
1406
1407         /******************/
1408         /* Function: 0x23 */
1409         WERROR srvsvc_NetPRNameCompare(
1410                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1411                 [in]   [string,charset(UTF16)] uint16 name1[],
1412                 [in]   [string,charset(UTF16)] uint16 name2[],
1413                 [in]    uint32 name_type,
1414                 [in]    uint32 flags
1415                 );
1416
1417 /**************************/
1418 /* srvsvc_NetShare ...    */
1419 /**************************/
1420         /******************/
1421         /* Function: 0x24 */
1422         /* Note, there must be some way to return entries read vs 
1423            total entries ... */
1424         WERROR srvsvc_NetShareEnum(
1425                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1426                 [in,out]   uint32 level,
1427                 [in,out,switch_is(level)]   srvsvc_NetShareCtr ctr,
1428                 [in]       uint32 max_buffer,
1429                 [out]      uint32 totalentries,
1430                 [in,out,unique]   uint32 *resume_handle
1431                 );
1432
1433         /******************/
1434         /* Function: 0x25 */
1435         WERROR srvsvc_NetShareDelStart(
1436                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1437                 [in]       [string,charset(UTF16)] uint16 share[],
1438                 [in]       uint32 reserved,
1439                 [out,unique] policy_handle *hnd
1440                 );
1441
1442         /******************/
1443         /* Function: 0x26 */
1444         WERROR srvsvc_NetShareDelCommit(
1445                 [in, out,unique] policy_handle *hnd
1446                 );
1447
1448         /******************/
1449         /* Function: 0x27 */
1450         WERROR srvsvc_NetGetFileSecurity(
1451                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1452                 [in,unique]       [string,charset(UTF16)] uint16 *share,
1453                 [in]       [string,charset(UTF16)] uint16 file[],
1454                 [in]       security_secinfo securityinformation,
1455                 [out,ref]  sec_desc_buf **sd_buf
1456                 );
1457
1458         /******************/
1459         /* Function: 0x28 */
1460         WERROR srvsvc_NetSetFileSecurity(
1461                 [in,unique]       [string,charset(UTF16)] uint16 *server_unc,
1462                 [in,unique]       [string,charset(UTF16)] uint16 *share,
1463                 [in]       [string,charset(UTF16)] uint16 file[],
1464                 [in]       security_secinfo securityinformation,
1465                 [in,ref]   sec_desc_buf *sd_buf
1466                 );
1467
1468
1469
1470         typedef [switch_type(uint32)] union {
1471                 [case(0)] srvsvc_NetTransportInfo0 info0;
1472                 [case(1)] srvsvc_NetTransportInfo1 info1;
1473                 [case(2)] srvsvc_NetTransportInfo2 info2;
1474                 [case(3)] srvsvc_NetTransportInfo3 info3;
1475         } srvsvc_NetTransportInfo;
1476
1477         /******************/
1478         /* Function: 0x29 */
1479         WERROR srvsvc_NetServerTransportAddEx(
1480                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1481                 [in] uint32 level,
1482                 [in,switch_is(level)]   srvsvc_NetTransportInfo info
1483                 );
1484
1485         /******************/
1486         /* Function: 0x2a */
1487         WERROR srvsvc_NetServerSetServiceBitsEx(
1488                 [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
1489                 [in,unique]   [string,charset(UTF16)] uint16 *emulated_server_unc,
1490                 [in,unique]   [string,charset(UTF16)] uint16 *transport,
1491                 [in]   uint32 servicebitsofinterest,
1492                 [in]   uint32 servicebits,
1493                 [in]   uint32 updateimmediately
1494                 );
1495
1496         /******************/
1497         /* Function: 0x2b */
1498         [todo] WERROR srvsvc_NETRDFSGETVERSION(
1499                 );
1500
1501         /******************/
1502         /* Function: 0x2c */
1503         [todo] WERROR srvsvc_NETRDFSCREATELOCALPARTITION(
1504                 );
1505
1506         /******************/
1507         /* Function: 0x2d */
1508         [todo] WERROR srvsvc_NETRDFSDELETELOCALPARTITION(
1509                 );
1510
1511         /******************/
1512         /* Function: 0x2e */
1513         [todo] WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(
1514                 );
1515
1516         /******************/
1517         /* Function: 0x2f */
1518         [todo] WERROR srvsvc_NETRDFSSETSERVERINFO(
1519                 );
1520
1521         /******************/
1522         /* Function: 0x30 */
1523         [todo] WERROR srvsvc_NETRDFSCREATEEXITPOINT(
1524                 );
1525
1526         /******************/
1527         /* Function: 0x31 */
1528         [todo] WERROR srvsvc_NETRDFSDELETEEXITPOINT(
1529                 );
1530
1531         /******************/
1532         /* Function: 0x32 */
1533         [todo] WERROR srvsvc_NETRDFSMODIFYPREFIX(
1534                 );
1535
1536         /******************/
1537         /* Function: 0x33 */
1538         [todo] WERROR srvsvc_NETRDFSFIXLOCALVOLUME(
1539                 );
1540
1541         /******************/
1542         /* Function: 0x34 */
1543         [todo] WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(
1544                 );
1545
1546         /******************/
1547         /* Function: 0x35 */
1548         [todo] WERROR srvsvc_NETRSERVERTRANSPORTDELEX(
1549                 );
1550 }