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