Removed version number from file header.
[jpeach/samba.git] / source / include / rpc_srvsvc.h
1 /*
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell 1992-1997
5    Copyright (C) Luke Kenneth Casson Leighton 1996-1997
6    Copyright (C) Paul Ashton 1997
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef _RPC_SRVSVC_H /* _RPC_SRVSVC_H */
24 #define _RPC_SRVSVC_H 
25
26
27 /* srvsvc pipe */
28 #define SRV_NETCONNENUM        0x08
29 #define SRV_NETFILEENUM        0x09
30 #define SRV_NETSESSENUM        0x0c
31 #define SRV_NET_SHARE_ADD      0x0e
32 #define SRV_NETSHAREENUM_ALL   0x0f
33 #define SRV_NET_SHARE_GET_INFO 0x10
34 #define SRV_NET_SHARE_SET_INFO 0x11
35 #define SRV_NET_SHARE_DEL      0x12
36 #define SRV_NET_SRV_GET_INFO   0x15
37 #define SRV_NET_SRV_SET_INFO   0x16
38 #define SRV_NET_DISK_ENUM      0x17
39 #define SRV_NET_REMOTE_TOD     0x1c
40 #define SRV_NET_NAME_VALIDATE  0x21
41 #define SRV_NETSHAREENUM       0x24
42 #define SRV_NETFILEQUERYSECDESC 0x27
43 #define SRV_NETFILESETSECDESC   0x28
44
45 #define MAX_SERVER_DISK_ENTRIES 15
46
47 typedef struct disk_info {
48         uint32  unknown;
49         UNISTR3 disk_name;
50 } DISK_INFO;
51
52 typedef struct disk_enum_container {
53         uint32 level;
54         uint32 entries_read;
55         uint32 unknown;
56         uint32 disk_info_ptr;
57         DISK_INFO disk_info[MAX_SERVER_DISK_ENTRIES];
58 } DISK_ENUM_CONTAINER;
59
60 typedef struct net_srv_disk_enum {
61         uint32 ptr_srv_name;         /* pointer (to server name?) */
62         UNISTR2 uni_srv_name;        /* server name */
63
64         DISK_ENUM_CONTAINER disk_enum_ctr;
65
66         uint32 preferred_len;        /* preferred maximum length (0xffff ffff) */
67         uint32 total_entries;        /* total number of entries */
68         ENUM_HND enum_hnd;
69         NTSTATUS status;               /* return status */
70 } SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
71
72 typedef struct net_name_validate {
73         uint32 ptr_srv_name;
74         UNISTR2 uni_srv_name;
75         UNISTR2 uni_name; /*name to validate*/
76         uint32 type;
77         uint32 flags;
78         NTSTATUS status;
79 } SRV_Q_NET_NAME_VALIDATE, SRV_R_NET_NAME_VALIDATE;
80
81 /* SESS_INFO_0 (pointers to level 0 session info strings) */
82 typedef struct ptr_sess_info0
83 {
84         uint32 ptr_name; /* pointer to name. */
85
86 } SESS_INFO_0;
87
88 /* SESS_INFO_0_STR (level 0 session info strings) */
89 typedef struct str_sess_info0
90 {
91         UNISTR2 uni_name; /* unicode string of name */
92
93 } SESS_INFO_0_STR;
94
95 /* oops - this is going to take up a *massive* amount of stack. */
96 /* the UNISTR2s already have 1024 uint16 chars in them... */
97 #define MAX_SESS_ENTRIES 32
98
99 /* SRV_SESS_INFO_0 */
100 typedef struct srv_sess_info_0_info
101 {
102         uint32 num_entries_read;                     /* EntriesRead */
103         uint32 ptr_sess_info;                       /* Buffer */
104         uint32 num_entries_read2;                    /* EntriesRead */
105
106         SESS_INFO_0     info_0    [MAX_SESS_ENTRIES]; /* session entry pointers */
107         SESS_INFO_0_STR info_0_str[MAX_SESS_ENTRIES]; /* session entry strings */
108
109 } SRV_SESS_INFO_0;
110
111 /* SESS_INFO_1 (pointers to level 1 session info strings) */
112 typedef struct ptr_sess_info1
113 {
114         uint32 ptr_name; /* pointer to name. */
115         uint32 ptr_user; /* pointer to user name. */
116
117         uint32 num_opens;
118         uint32 open_time;
119         uint32 idle_time;
120         uint32 user_flags;
121
122 } SESS_INFO_1;
123
124 /* SESS_INFO_1_STR (level 1 session info strings) */
125 typedef struct str_sess_info1
126 {
127         UNISTR2 uni_name; /* unicode string of name */
128         UNISTR2 uni_user; /* unicode string of user */
129
130 } SESS_INFO_1_STR;
131
132 /* SRV_SESS_INFO_1 */
133 typedef struct srv_sess_info_1_info
134 {
135         uint32 num_entries_read;                     /* EntriesRead */
136         uint32 ptr_sess_info;                       /* Buffer */
137         uint32 num_entries_read2;                    /* EntriesRead */
138
139         SESS_INFO_1     info_1    [MAX_SESS_ENTRIES]; /* session entry pointers */
140         SESS_INFO_1_STR info_1_str[MAX_SESS_ENTRIES]; /* session entry strings */
141
142 } SRV_SESS_INFO_1;
143
144 /* SRV_SESS_INFO_CTR */
145 typedef struct srv_sess_info_ctr_info
146 {
147         uint32 switch_value;         /* switch value */
148         uint32 ptr_sess_ctr;       /* pointer to sess info union */
149         union
150     {
151                 SRV_SESS_INFO_0 info0; /* session info level 0 */
152                 SRV_SESS_INFO_1 info1; /* session info level 1 */
153
154     } sess;
155
156 } SRV_SESS_INFO_CTR;
157
158
159 /* SRV_Q_NET_SESS_ENUM */
160 typedef struct q_net_sess_enum_info
161 {
162         uint32 ptr_srv_name;         /* pointer (to server name?) */
163         UNISTR2 uni_srv_name;        /* server name */
164
165         uint32 ptr_qual_name;         /* pointer (to qualifier name) */
166         UNISTR2 uni_qual_name;        /* qualifier name "\\qualifier" */
167
168         uint32 sess_level;          /* session level */
169
170         SRV_SESS_INFO_CTR *ctr;
171
172         uint32 preferred_len;        /* preferred maximum length (0xffff ffff) */
173         ENUM_HND enum_hnd;
174
175 } SRV_Q_NET_SESS_ENUM;
176
177 /* SRV_R_NET_SESS_ENUM */
178 typedef struct r_net_sess_enum_info
179 {
180         uint32 sess_level;          /* share level */
181
182         SRV_SESS_INFO_CTR *ctr;
183
184         uint32 total_entries;                    /* total number of entries */
185         ENUM_HND enum_hnd;
186
187         NTSTATUS status;               /* return status */
188
189 } SRV_R_NET_SESS_ENUM;
190
191 /* CONN_INFO_0 (pointers to level 0 connection info strings) */
192 typedef struct ptr_conn_info0
193 {
194         uint32 id; /* connection id. */
195
196 } CONN_INFO_0;
197
198 /* oops - this is going to take up a *massive* amount of stack. */
199 /* the UNISTR2s already have 1024 uint16 chars in them... */
200 #define MAX_CONN_ENTRIES 32
201
202 /* SRV_CONN_INFO_0 */
203 typedef struct srv_conn_info_0_info
204 {
205         uint32 num_entries_read;                     /* EntriesRead */
206         uint32 ptr_conn_info;                       /* Buffer */
207         uint32 num_entries_read2;                    /* EntriesRead */
208
209         CONN_INFO_0     info_0    [MAX_CONN_ENTRIES]; /* connection entry pointers */
210
211 } SRV_CONN_INFO_0;
212
213 /* CONN_INFO_1 (pointers to level 1 connection info strings) */
214 typedef struct ptr_conn_info1
215 {
216         uint32 id;   /* connection id */
217         uint32 type; /* 0x3 */
218         uint32 num_opens;
219         uint32 num_users;
220         uint32 open_time;
221
222         uint32 ptr_usr_name; /* pointer to user name. */
223         uint32 ptr_net_name; /* pointer to network name (e.g IPC$). */
224
225 } CONN_INFO_1;
226
227 /* CONN_INFO_1_STR (level 1 connection info strings) */
228 typedef struct str_conn_info1
229 {
230         UNISTR2 uni_usr_name; /* unicode string of user */
231         UNISTR2 uni_net_name; /* unicode string of name */
232
233 } CONN_INFO_1_STR;
234
235 /* SRV_CONN_INFO_1 */
236 typedef struct srv_conn_info_1_info
237 {
238         uint32 num_entries_read;                     /* EntriesRead */
239         uint32 ptr_conn_info;                       /* Buffer */
240         uint32 num_entries_read2;                    /* EntriesRead */
241
242         CONN_INFO_1     info_1    [MAX_CONN_ENTRIES]; /* connection entry pointers */
243         CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES]; /* connection entry strings */
244
245 } SRV_CONN_INFO_1;
246
247 /* SRV_CONN_INFO_CTR */
248 typedef struct srv_conn_info_ctr_info
249 {
250         uint32 switch_value;         /* switch value */
251         uint32 ptr_conn_ctr;       /* pointer to conn info union */
252         union
253     {
254                 SRV_CONN_INFO_0 info0; /* connection info level 0 */
255                 SRV_CONN_INFO_1 info1; /* connection info level 1 */
256
257     } conn;
258
259 } SRV_CONN_INFO_CTR;
260
261
262 /* SRV_Q_NET_CONN_ENUM */
263 typedef struct q_net_conn_enum_info
264 {
265         uint32 ptr_srv_name;         /* pointer (to server name) */
266         UNISTR2 uni_srv_name;        /* server name "\\server" */
267
268         uint32 ptr_qual_name;         /* pointer (to qualifier name) */
269         UNISTR2 uni_qual_name;        /* qualifier name "\\qualifier" */
270
271         uint32 conn_level;          /* connection level */
272
273         SRV_CONN_INFO_CTR *ctr;
274
275         uint32 preferred_len;        /* preferred maximum length (0xffff ffff) */
276         ENUM_HND enum_hnd;
277
278 } SRV_Q_NET_CONN_ENUM;
279
280 /* SRV_R_NET_CONN_ENUM */
281 typedef struct r_net_conn_enum_info
282 {
283         uint32 conn_level;          /* share level */
284
285         SRV_CONN_INFO_CTR *ctr;
286
287         uint32 total_entries;                    /* total number of entries */
288         ENUM_HND enum_hnd;
289
290         NTSTATUS status;               /* return status */
291
292 } SRV_R_NET_CONN_ENUM;
293
294 /* SH_INFO_1 (pointers to level 1 share info strings) */
295 typedef struct ptr_share_info1
296 {
297         uint32 ptr_netname; /* pointer to net name. */
298         uint32 type; /* ipc, print, disk ... */
299         uint32 ptr_remark; /* pointer to comment. */
300
301 } SH_INFO_1;
302
303 /* SH_INFO_1_STR (level 1 share info strings) */
304 typedef struct str_share_info1
305 {
306         UNISTR2 uni_netname; /* unicode string of net name */
307         UNISTR2 uni_remark; /* unicode string of comment */
308
309 } SH_INFO_1_STR;
310
311 /* SRV_SHARE_INFO_1 */
312 typedef struct share_info_1_info
313 {
314         SH_INFO_1 info_1;
315         SH_INFO_1_STR info_1_str;
316
317 } SRV_SHARE_INFO_1;
318
319 /* SH_INFO_2 (pointers to level 2 share info strings) */
320 typedef struct ptr_share_info2
321 {
322         uint32 ptr_netname; /* pointer to net name. */
323         uint32 type; /* ipc, print, disk ... */
324         uint32 ptr_remark; /* pointer to comment. */
325         uint32 perms;      /* permissions */
326         uint32 max_uses;   /* maximum uses */
327         uint32 num_uses;   /* current uses */
328         uint32 ptr_path;   /* pointer to path name */
329         uint32 ptr_passwd; /* pointer to password */
330
331 } SH_INFO_2;
332
333 /* SH_INFO_2_STR (level 2 share info strings) */
334 typedef struct str_share_info2
335 {
336         UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */
337         UNISTR2 uni_remark;  /* unicode string of comment (e.g "Logon server share") */
338         UNISTR2 uni_path;    /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */
339         UNISTR2 uni_passwd;  /* unicode string of password - presumably for share level security (e.g NULL) */
340
341 } SH_INFO_2_STR;
342
343 /* SRV_SHARE_INFO_2 */
344 typedef struct share_info_2_info
345 {
346         SH_INFO_2 info_2;
347         SH_INFO_2_STR info_2_str;
348
349 } SRV_SHARE_INFO_2;
350
351 /* SH_INFO_502 (pointers to level 502 share info strings) */
352 typedef struct ptr_share_info502
353 {
354         uint32 ptr_netname; /* pointer to net name. */
355         uint32 type; /* ipc, print, disk ... */
356         uint32 ptr_remark; /* pointer to comment. */
357         uint32 perms;      /* permissions */
358         uint32 max_uses;   /* maximum uses */
359         uint32 num_uses;   /* current uses */
360         uint32 ptr_path;   /* pointer to path name */
361         uint32 ptr_passwd; /* pointer to password */
362         uint32 sd_size;    /* size of security descriptor */
363         uint32 ptr_sd;     /* pointer to security descriptor */
364
365 } SH_INFO_502;
366
367 /* SH_INFO_502_STR (level 502 share info strings) */
368 typedef struct str_share_info502
369 {
370         SH_INFO_502 *ptrs;
371
372         UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */
373         UNISTR2 uni_remark;  /* unicode string of comment (e.g "Logon server share") */
374         UNISTR2 uni_path;    /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */
375         UNISTR2 uni_passwd;  /* unicode string of password - presumably for share level security (e.g NULL) */
376
377         uint32 sd_size;
378         SEC_DESC *sd;
379
380 } SH_INFO_502_STR;
381
382 /* SRV_SHARE_INFO_502 */
383 typedef struct share_info_502_info
384 {
385         SH_INFO_502 info_502;
386         SH_INFO_502_STR info_502_str;
387
388 } SRV_SHARE_INFO_502;
389
390 /* SRV_SHARE_INFO_1005 */
391 typedef struct share_info_1005_info
392 {
393   uint32 dfs_root_flag; 
394 } SRV_SHARE_INFO_1005;
395
396 /* SRV_SHARE_INFO_1501 */
397 typedef struct share_info_1501_info
398 {
399         SEC_DESC_BUF *sdb;
400 } SRV_SHARE_INFO_1501;
401
402 /* SRV_SHARE_INFO_CTR */
403 typedef struct srv_share_info_ctr_info
404 {
405         uint32 info_level;
406         uint32 switch_value;
407         uint32 ptr_share_info;
408
409         uint32 num_entries;
410         uint32 ptr_entries;
411         uint32 num_entries2;
412
413         union {
414                 SRV_SHARE_INFO_1 *info1; /* share info level 1 */
415                 SRV_SHARE_INFO_2 *info2; /* share info level 2 */
416                 SRV_SHARE_INFO_502 *info502; /* share info level 502 */
417                 void *info;
418
419         } share;
420
421 } SRV_SHARE_INFO_CTR;
422
423 /* SRV_Q_NET_SHARE_ENUM */
424 typedef struct q_net_share_enum_info
425 {
426         uint32 ptr_srv_name;         /* pointer (to server name?) */
427         UNISTR2 uni_srv_name;        /* server name */
428
429         SRV_SHARE_INFO_CTR ctr;     /* share info container */
430
431         uint32 preferred_len;        /* preferred maximum length (0xffff ffff) */
432
433         ENUM_HND enum_hnd;
434
435 } SRV_Q_NET_SHARE_ENUM;
436
437
438 /* SRV_R_NET_SHARE_ENUM */
439 typedef struct r_net_share_enum_info
440 {
441         SRV_SHARE_INFO_CTR ctr;     /* share info container */
442
443         uint32 total_entries;                    /* total number of entries */
444         ENUM_HND enum_hnd;
445
446         NTSTATUS status;               /* return status */
447
448 } SRV_R_NET_SHARE_ENUM;
449
450
451 /* SRV_Q_NET_SHARE_GET_INFO */
452 typedef struct q_net_share_get_info_info
453 {
454         uint32 ptr_srv_name;
455         UNISTR2 uni_srv_name;
456
457         UNISTR2 uni_share_name;
458         uint32 info_level;
459
460 } SRV_Q_NET_SHARE_GET_INFO;
461
462 /* JRA. NB. We also need level 1004 and 1006 here. */
463
464 /* SRV_SHARE_INFO */
465 typedef struct srv_share_info {
466         uint32 switch_value;
467         uint32 ptr_share_ctr;
468
469         union {
470                 SRV_SHARE_INFO_1 info1;
471                 SRV_SHARE_INFO_2 info2;
472                 SRV_SHARE_INFO_502 info502;
473         SRV_SHARE_INFO_1005 info1005;
474         SRV_SHARE_INFO_1501 info1501;
475         } share;
476 } SRV_SHARE_INFO;
477
478 /* SRV_R_NET_SHARE_GET_INFO */
479 typedef struct r_net_share_get_info_info
480 {
481         SRV_SHARE_INFO info;
482         NTSTATUS status;
483
484 } SRV_R_NET_SHARE_GET_INFO;
485
486 /* SRV_Q_NET_SHARE_SET_INFO */
487 typedef struct q_net_share_set_info_info
488 {
489         uint32 ptr_srv_name;
490         UNISTR2 uni_srv_name;
491
492         UNISTR2 uni_share_name;
493         uint32 info_level;
494
495         SRV_SHARE_INFO info;
496
497 } SRV_Q_NET_SHARE_SET_INFO;
498
499 /* SRV_R_NET_SHARE_SET_INFO */
500 typedef struct r_net_share_set_info
501 {
502         uint32 switch_value;         /* switch value */
503
504         NTSTATUS status;               /* return status */
505
506 } SRV_R_NET_SHARE_SET_INFO;
507
508 /* SRV_Q_NET_SHARE_ADD */
509 typedef struct q_net_share_add
510 {
511         uint32 ptr_srv_name;
512         UNISTR2 uni_srv_name;
513
514         uint32 info_level;
515
516         SRV_SHARE_INFO info;
517
518 } SRV_Q_NET_SHARE_ADD;
519
520 /* SRV_R_NET_SHARE_ADD */
521 typedef struct r_net_share_add
522 {
523         uint32 switch_value;         /* switch value */
524
525         NTSTATUS status;               /* return status */
526
527 } SRV_R_NET_SHARE_ADD;
528
529 /* SRV_Q_NET_SHARE_DEL */
530 typedef struct q_net_share_del
531 {
532         uint32 ptr_srv_name;
533         UNISTR2 uni_srv_name;
534         UNISTR2 uni_share_name;
535
536 } SRV_Q_NET_SHARE_DEL;
537
538 /* SRV_R_NET_SHARE_DEL */
539 typedef struct r_net_share_del
540 {
541         NTSTATUS status;               /* return status */
542
543 } SRV_R_NET_SHARE_DEL;
544
545 /* FILE_INFO_3 (level 3 file info strings) */
546 typedef struct file_info3_info
547 {
548         uint32 id;            /* file index */
549         uint32 perms;         /* file permissions. don't know what format */
550         uint32 num_locks;     /* file locks */
551         uint32 ptr_path_name; /* file name */
552         uint32 ptr_user_name; /* file owner */
553
554 } FILE_INFO_3;
555
556 /* FILE_INFO_3_STR (level 3 file info strings) */
557 typedef struct str_file_info3_info
558 {
559         UNISTR2 uni_path_name; /* unicode string of file name */
560         UNISTR2 uni_user_name; /* unicode string of file owner. */
561
562 } FILE_INFO_3_STR;
563
564 /* oops - this is going to take up a *massive* amount of stack. */
565 /* the UNISTR2s already have 1024 uint16 chars in them... */
566 #define MAX_FILE_ENTRIES 32
567
568 /* SRV_FILE_INFO_3 */
569 typedef struct srv_file_info_3
570 {
571         uint32 num_entries_read;                     /* EntriesRead */
572         uint32 ptr_file_info;                        /* Buffer */
573
574         uint32 num_entries_read2;                    /* EntriesRead */
575
576         FILE_INFO_3     info_3    [MAX_FILE_ENTRIES]; /* file entry details */
577         FILE_INFO_3_STR info_3_str[MAX_FILE_ENTRIES]; /* file entry strings */
578
579 } SRV_FILE_INFO_3;
580
581 /* SRV_FILE_INFO_CTR */
582 typedef struct srv_file_info_3_info
583 {
584         uint32 switch_value;         /* switch value */
585         uint32 ptr_file_ctr;       /* pointer to file info union */
586         union
587     {
588                 SRV_FILE_INFO_3 info3; /* file info with 0 entries */
589
590     } file;
591
592 } SRV_FILE_INFO_CTR;
593
594
595 /* SRV_Q_NET_FILE_ENUM */
596 typedef struct q_net_file_enum_info
597 {
598         uint32 ptr_srv_name;         /* pointer (to server name?) */
599         UNISTR2 uni_srv_name;        /* server name */
600
601         uint32 ptr_qual_name;         /* pointer (to qualifier name) */
602         UNISTR2 uni_qual_name;        /* qualifier name "\\qualifier" */
603
604         uint32 file_level;          /* file level */
605
606         SRV_FILE_INFO_CTR *ctr;
607
608         uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
609         ENUM_HND enum_hnd;
610
611 } SRV_Q_NET_FILE_ENUM;
612
613
614 /* SRV_R_NET_FILE_ENUM */
615 typedef struct r_net_file_enum_info
616 {
617         uint32 file_level;          /* file level */
618
619         SRV_FILE_INFO_CTR *ctr;
620
621         uint32 total_entries;                    /* total number of files */
622         ENUM_HND enum_hnd;
623
624         NTSTATUS status;        /* return status */
625
626 } SRV_R_NET_FILE_ENUM;
627
628 /* SRV_INFO_100 */
629 typedef struct srv_info_100_info
630 {
631         uint32 platform_id;     /* 0x500 */
632         uint32 ptr_name;        /* pointer to server name */
633
634         UNISTR2 uni_name;       /* server name "server" */
635
636 } SRV_INFO_100;
637
638 /* SRV_INFO_101 */
639 typedef struct srv_info_101_info
640 {
641         uint32 platform_id;     /* 0x500 */
642         uint32 ptr_name;        /* pointer to server name */
643         uint32 ver_major;       /* 0x4 */
644         uint32 ver_minor;       /* 0x2 */
645         uint32 srv_type;        /* browse etc type */
646         uint32 ptr_comment;     /* pointer to server comment */
647
648         UNISTR2 uni_name;       /* server name "server" */
649         UNISTR2 uni_comment;    /* server comment "samba x.x.x blah" */
650
651 } SRV_INFO_101;
652
653 /* SRV_INFO_102  */
654 typedef struct srv_info_102_info
655 {
656         uint32 platform_id;     /* 0x500 */
657         uint32 ptr_name;        /* pointer to server name */
658         uint32 ver_major;       /* 0x4 */
659         uint32 ver_minor;       /* 0x2 */
660         uint32 srv_type;        /* browse etc type */
661         uint32 ptr_comment;     /* pointer to server comment */
662         uint32 users;           /* 0xffff ffff*/
663         uint32 disc;            /* 0xf */
664         uint32 hidden;          /* 0x0 */
665         uint32 announce;        /* 240 */
666         uint32 ann_delta;       /* 3000 */
667         uint32 licenses;        /* 0 */
668         uint32 ptr_usr_path;    /* pointer to user path */
669
670         UNISTR2 uni_name;       /* server name "server" */
671         UNISTR2 uni_comment;    /* server comment "samba x.x.x blah" */
672         UNISTR2 uni_usr_path;   /* "c:\" (eh?) */
673
674 } SRV_INFO_102;
675
676
677 /* SRV_INFO_CTR */
678 typedef struct srv_info_ctr_info
679 {
680         uint32 switch_value;         /* switch value */
681         uint32 ptr_srv_ctr;         /* pointer to server info */
682         union
683     {
684                 SRV_INFO_102 sv102; /* server info level 102 */
685                 SRV_INFO_101 sv101; /* server info level 101 */
686                 SRV_INFO_100 sv100; /* server info level 100 */
687
688     } srv;
689
690 } SRV_INFO_CTR;
691
692 /* SRV_Q_NET_SRV_GET_INFO */
693 typedef struct q_net_srv_get_info
694 {
695         uint32  ptr_srv_name;
696         UNISTR2 uni_srv_name; /* "\\server" */
697         uint32  switch_value;
698
699 } SRV_Q_NET_SRV_GET_INFO;
700
701 /* SRV_R_NET_SRV_GET_INFO */
702 typedef struct r_net_srv_get_info
703 {
704         SRV_INFO_CTR *ctr;
705
706         NTSTATUS status;               /* return status */
707
708 } SRV_R_NET_SRV_GET_INFO;
709
710 /* SRV_Q_NET_SRV_SET_INFO */
711 typedef struct q_net_srv_set_info
712 {
713         uint32  ptr_srv_name;
714         UNISTR2 uni_srv_name; /* "\\server" */
715         uint32  switch_value;
716
717         SRV_INFO_CTR *ctr;
718
719 } SRV_Q_NET_SRV_SET_INFO;
720
721
722 /* SRV_R_NET_SRV_SET_INFO */
723 typedef struct r_net_srv_set_info
724 {
725         uint32 switch_value;         /* switch value */
726
727         NTSTATUS status;               /* return status */
728
729 } SRV_R_NET_SRV_SET_INFO;
730
731 /* SRV_Q_NET_REMOTE_TOD */
732 typedef struct q_net_remote_tod
733 {
734         uint32  ptr_srv_name;
735         UNISTR2 uni_srv_name; /* "\\server" */
736
737 } SRV_Q_NET_REMOTE_TOD;
738
739 /* TIME_OF_DAY_INFO */
740 typedef struct time_of_day_info
741 {
742         uint32  elapsedt;
743         uint32  msecs;
744         uint32  hours;
745         uint32  mins;
746         uint32  secs;
747         uint32  hunds;
748         uint32  zone;
749         uint32  tintervals;
750         uint32  day;
751         uint32  month;
752         uint32  year;
753         uint32  weekday;
754         
755 } TIME_OF_DAY_INFO;
756
757 /* SRV_R_NET_REMOTE_TOD */
758 typedef struct r_net_remote_tod
759 {
760         uint32 ptr_srv_tod;         /* pointer to TOD */
761         TIME_OF_DAY_INFO *tod;
762         
763         NTSTATUS status;               /* return status */
764
765 } SRV_R_NET_REMOTE_TOD;
766
767 /* SRV_Q_NET_FILE_QUERY_SECDESC */
768 typedef struct q_net_file_query_secdesc
769 {
770         uint32  ptr_srv_name;
771         UNISTR2 uni_srv_name;
772         uint32  ptr_qual_name;
773         UNISTR2 uni_qual_name;
774         UNISTR2 uni_file_name;
775         uint32  unknown1;
776         uint32  unknown2;
777         uint32  unknown3;
778 } SRV_Q_NET_FILE_QUERY_SECDESC;
779
780 /* SRV_R_NET_FILE_QUERY_SECDESC */
781 typedef struct r_net_file_query_secdesc
782 {
783         uint32 ptr_response;
784         uint32 size_response;
785         uint32 ptr_secdesc;
786         uint32 size_secdesc;
787         SEC_DESC *sec_desc;
788         NTSTATUS status;
789 } SRV_R_NET_FILE_QUERY_SECDESC;
790
791 /* SRV_Q_NET_FILE_SET_SECDESC */
792 typedef struct q_net_file_set_secdesc
793 {
794         uint32  ptr_srv_name;
795         UNISTR2 uni_srv_name;
796         uint32  ptr_qual_name;
797         UNISTR2 uni_qual_name;
798         UNISTR2 uni_file_name;
799         uint32  sec_info;
800         uint32  size_set;
801         uint32  ptr_secdesc;
802         uint32  size_secdesc;
803         SEC_DESC *sec_desc;
804 } SRV_Q_NET_FILE_SET_SECDESC;
805
806 /* SRV_R_NET_FILE_SET_SECDESC */
807 typedef struct r_net_file_set_secdesc
808 {
809         NTSTATUS status;
810 } SRV_R_NET_FILE_SET_SECDESC;
811 #endif /* _RPC_SRVSVC_H */