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