Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / samba / source / include / rpc_srvsvc.h
blob78949a7a7d99a56b4992508541c725f48c618c89
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1997
7 Copyright (C) Paul Ashton 1997
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_SRVSVC_H /* _RPC_SRVSVC_H */
25 #define _RPC_SRVSVC_H
28 /* srvsvc pipe */
29 #define SRV_NETCONNENUM 0x08
30 #define SRV_NETFILEENUM 0x09
31 #define SRV_NETSESSENUM 0x0c
32 #define SRV_NETSHAREENUM 0x0f
33 #define SRV_NET_SHARE_GET_INFO 0x10
34 #define SRV_NET_SRV_GET_INFO 0x15
35 #define SRV_NET_SRV_SET_INFO 0x16
36 #define SRV_NET_REMOTE_TOD 0x1c
38 /* SESS_INFO_0 (pointers to level 0 session info strings) */
39 typedef struct ptr_sess_info0
41 uint32 ptr_name; /* pointer to name. */
43 } SESS_INFO_0;
45 /* SESS_INFO_0_STR (level 0 session info strings) */
46 typedef struct str_sess_info0
48 UNISTR2 uni_name; /* unicode string of name */
50 } SESS_INFO_0_STR;
52 /* oops - this is going to take up a *massive* amount of stack. */
53 /* the UNISTR2s already have 1024 uint16 chars in them... */
54 #define MAX_SESS_ENTRIES 32
56 /* SRV_SESS_INFO_0 */
57 typedef struct srv_sess_info_0_info
59 uint32 num_entries_read; /* EntriesRead */
60 uint32 ptr_sess_info; /* Buffer */
61 uint32 num_entries_read2; /* EntriesRead */
63 SESS_INFO_0 info_0 [MAX_SESS_ENTRIES]; /* session entry pointers */
64 SESS_INFO_0_STR info_0_str[MAX_SESS_ENTRIES]; /* session entry strings */
66 } SRV_SESS_INFO_0;
68 /* SESS_INFO_1 (pointers to level 1 session info strings) */
69 typedef struct ptr_sess_info1
71 uint32 ptr_name; /* pointer to name. */
72 uint32 ptr_user; /* pointer to user name. */
74 uint32 num_opens;
75 uint32 open_time;
76 uint32 idle_time;
77 uint32 user_flags;
79 } SESS_INFO_1;
81 /* SESS_INFO_1_STR (level 1 session info strings) */
82 typedef struct str_sess_info1
84 UNISTR2 uni_name; /* unicode string of name */
85 UNISTR2 uni_user; /* unicode string of user */
87 } SESS_INFO_1_STR;
89 /* SRV_SESS_INFO_1 */
90 typedef struct srv_sess_info_1_info
92 uint32 num_entries_read; /* EntriesRead */
93 uint32 ptr_sess_info; /* Buffer */
94 uint32 num_entries_read2; /* EntriesRead */
96 SESS_INFO_1 info_1 [MAX_SESS_ENTRIES]; /* session entry pointers */
97 SESS_INFO_1_STR info_1_str[MAX_SESS_ENTRIES]; /* session entry strings */
99 } SRV_SESS_INFO_1;
101 /* SRV_SESS_INFO_CTR */
102 typedef struct srv_sess_info_ctr_info
104 uint32 switch_value; /* switch value */
105 uint32 ptr_sess_ctr; /* pointer to sess info union */
106 union
108 SRV_SESS_INFO_0 info0; /* session info level 0 */
109 SRV_SESS_INFO_1 info1; /* session info level 1 */
111 } sess;
113 } SRV_SESS_INFO_CTR;
116 /* SRV_Q_NET_SESS_ENUM */
117 typedef struct q_net_sess_enum_info
119 uint32 ptr_srv_name; /* pointer (to server name?) */
120 UNISTR2 uni_srv_name; /* server name */
122 uint32 ptr_qual_name; /* pointer (to qualifier name) */
123 UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
125 uint32 sess_level; /* session level */
127 SRV_SESS_INFO_CTR *ctr;
129 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
130 ENUM_HND enum_hnd;
132 } SRV_Q_NET_SESS_ENUM;
134 /* SRV_R_NET_SESS_ENUM */
135 typedef struct r_net_sess_enum_info
137 uint32 sess_level; /* share level */
139 SRV_SESS_INFO_CTR *ctr;
141 uint32 total_entries; /* total number of entries */
142 ENUM_HND enum_hnd;
144 uint32 status; /* return status */
146 } SRV_R_NET_SESS_ENUM;
148 /* CONN_INFO_0 (pointers to level 0 connection info strings) */
149 typedef struct ptr_conn_info0
151 uint32 id; /* connection id. */
153 } CONN_INFO_0;
155 /* oops - this is going to take up a *massive* amount of stack. */
156 /* the UNISTR2s already have 1024 uint16 chars in them... */
157 #define MAX_CONN_ENTRIES 32
159 /* SRV_CONN_INFO_0 */
160 typedef struct srv_conn_info_0_info
162 uint32 num_entries_read; /* EntriesRead */
163 uint32 ptr_conn_info; /* Buffer */
164 uint32 num_entries_read2; /* EntriesRead */
166 CONN_INFO_0 info_0 [MAX_CONN_ENTRIES]; /* connection entry pointers */
168 } SRV_CONN_INFO_0;
170 /* CONN_INFO_1 (pointers to level 1 connection info strings) */
171 typedef struct ptr_conn_info1
173 uint32 id; /* connection id */
174 uint32 type; /* 0x3 */
175 uint32 num_opens;
176 uint32 num_users;
177 uint32 open_time;
179 uint32 ptr_usr_name; /* pointer to user name. */
180 uint32 ptr_net_name; /* pointer to network name (e.g IPC$). */
182 } CONN_INFO_1;
184 /* CONN_INFO_1_STR (level 1 connection info strings) */
185 typedef struct str_conn_info1
187 UNISTR2 uni_usr_name; /* unicode string of user */
188 UNISTR2 uni_net_name; /* unicode string of name */
190 } CONN_INFO_1_STR;
192 /* SRV_CONN_INFO_1 */
193 typedef struct srv_conn_info_1_info
195 uint32 num_entries_read; /* EntriesRead */
196 uint32 ptr_conn_info; /* Buffer */
197 uint32 num_entries_read2; /* EntriesRead */
199 CONN_INFO_1 info_1 [MAX_CONN_ENTRIES]; /* connection entry pointers */
200 CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES]; /* connection entry strings */
202 } SRV_CONN_INFO_1;
204 /* SRV_CONN_INFO_CTR */
205 typedef struct srv_conn_info_ctr_info
207 uint32 switch_value; /* switch value */
208 uint32 ptr_conn_ctr; /* pointer to conn info union */
209 union
211 SRV_CONN_INFO_0 info0; /* connection info level 0 */
212 SRV_CONN_INFO_1 info1; /* connection info level 1 */
214 } conn;
216 } SRV_CONN_INFO_CTR;
219 /* SRV_Q_NET_CONN_ENUM */
220 typedef struct q_net_conn_enum_info
222 uint32 ptr_srv_name; /* pointer (to server name) */
223 UNISTR2 uni_srv_name; /* server name "\\server" */
225 uint32 ptr_qual_name; /* pointer (to qualifier name) */
226 UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
228 uint32 conn_level; /* connection level */
230 SRV_CONN_INFO_CTR *ctr;
232 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
233 ENUM_HND enum_hnd;
235 } SRV_Q_NET_CONN_ENUM;
237 /* SRV_R_NET_CONN_ENUM */
238 typedef struct r_net_conn_enum_info
240 uint32 conn_level; /* share level */
242 SRV_CONN_INFO_CTR *ctr;
244 uint32 total_entries; /* total number of entries */
245 ENUM_HND enum_hnd;
247 uint32 status; /* return status */
249 } SRV_R_NET_CONN_ENUM;
251 /* SH_INFO_1 (pointers to level 1 share info strings) */
252 typedef struct ptr_share_info1
254 uint32 ptr_netname; /* pointer to net name. */
255 uint32 type; /* ipc, print, disk ... */
256 uint32 ptr_remark; /* pointer to comment. */
258 } SH_INFO_1;
260 /* SH_INFO_1_STR (level 1 share info strings) */
261 typedef struct str_share_info1
263 UNISTR2 uni_netname; /* unicode string of net name */
264 UNISTR2 uni_remark; /* unicode string of comment */
266 } SH_INFO_1_STR;
268 /* SRV_SHARE_INFO_1 */
269 typedef struct share_info_1_info
271 SH_INFO_1 info_1;
272 SH_INFO_1_STR info_1_str;
274 } SRV_SHARE_INFO_1;
276 /* SH_INFO_2 (pointers to level 2 share info strings) */
277 typedef struct ptr_share_info2
279 uint32 ptr_netname; /* pointer to net name. */
280 uint32 type; /* ipc, print, disk ... */
281 uint32 ptr_remark; /* pointer to comment. */
282 uint32 perms; /* permissions */
283 uint32 max_uses; /* maximum uses */
284 uint32 num_uses; /* current uses */
285 uint32 ptr_path; /* pointer to path name */
286 uint32 ptr_passwd; /* pointer to password */
288 } SH_INFO_2;
290 /* SH_INFO_2_STR (level 2 share info strings) */
291 typedef struct str_share_info2
293 UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */
294 UNISTR2 uni_remark; /* unicode string of comment (e.g "Logon server share") */
295 UNISTR2 uni_path; /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */
296 UNISTR2 uni_passwd; /* unicode string of password - presumably for share level security (e.g NULL) */
298 } SH_INFO_2_STR;
300 /* SRV_SHARE_INFO_2 */
301 typedef struct share_info_2_info
303 SH_INFO_2 info_2;
304 SH_INFO_2_STR info_2_str;
306 } SRV_SHARE_INFO_2;
308 /* SRV_SHARE_INFO_CTR */
309 typedef struct srv_share_info_ctr_info
311 uint32 info_level;
312 uint32 switch_value;
313 uint32 ptr_share_info;
315 uint32 num_entries;
316 uint32 ptr_entries;
317 uint32 num_entries2;
319 union {
320 SRV_SHARE_INFO_1 *info1; /* share info level 1 */
321 SRV_SHARE_INFO_2 *info2; /* share info level 2 */
322 void *info;
324 } share;
326 } SRV_SHARE_INFO_CTR;
328 /* SRV_Q_NET_SHARE_ENUM */
329 typedef struct q_net_share_enum_info
331 uint32 ptr_srv_name; /* pointer (to server name?) */
332 UNISTR2 uni_srv_name; /* server name */
334 SRV_SHARE_INFO_CTR ctr; /* share info container */
336 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
338 ENUM_HND enum_hnd;
340 } SRV_Q_NET_SHARE_ENUM;
343 /* SRV_R_NET_SHARE_ENUM */
344 typedef struct r_net_share_enum_info
346 SRV_SHARE_INFO_CTR ctr; /* share info container */
348 uint32 total_entries; /* total number of entries */
349 ENUM_HND enum_hnd;
351 uint32 status; /* return status */
353 } SRV_R_NET_SHARE_ENUM;
356 /* SRV_Q_NET_SHARE_GET_INFO */
357 typedef struct q_net_share_get_info_info
359 uint32 ptr_srv_name;
360 UNISTR2 uni_srv_name;
362 UNISTR2 uni_share_name;
363 uint32 info_level;
365 } SRV_Q_NET_SHARE_GET_INFO;
367 /* SRV_R_NET_SHARE_GET_INFO */
368 typedef struct r_net_share_get_info_info
370 uint32 switch_value;
371 uint32 ptr_share_ctr;
373 union {
374 SRV_SHARE_INFO_1 info1;
375 SRV_SHARE_INFO_2 info2;
377 } share;
379 uint32 status;
381 } SRV_R_NET_SHARE_GET_INFO;
384 /* FILE_INFO_3 (level 3 file info strings) */
385 typedef struct file_info3_info
387 uint32 id; /* file index */
388 uint32 perms; /* file permissions. don't know what format */
389 uint32 num_locks; /* file locks */
390 uint32 ptr_path_name; /* file name */
391 uint32 ptr_user_name; /* file owner */
393 } FILE_INFO_3;
395 /* FILE_INFO_3_STR (level 3 file info strings) */
396 typedef struct str_file_info3_info
398 UNISTR2 uni_path_name; /* unicode string of file name */
399 UNISTR2 uni_user_name; /* unicode string of file owner. */
401 } FILE_INFO_3_STR;
403 /* oops - this is going to take up a *massive* amount of stack. */
404 /* the UNISTR2s already have 1024 uint16 chars in them... */
405 #define MAX_FILE_ENTRIES 32
407 /* SRV_FILE_INFO_3 */
408 typedef struct srv_file_info_3
410 uint32 num_entries_read; /* EntriesRead */
411 uint32 ptr_file_info; /* Buffer */
413 uint32 num_entries_read2; /* EntriesRead */
415 FILE_INFO_3 info_3 [MAX_FILE_ENTRIES]; /* file entry details */
416 FILE_INFO_3_STR info_3_str[MAX_FILE_ENTRIES]; /* file entry strings */
418 } SRV_FILE_INFO_3;
420 /* SRV_FILE_INFO_CTR */
421 typedef struct srv_file_info_3_info
423 uint32 switch_value; /* switch value */
424 uint32 ptr_file_ctr; /* pointer to file info union */
425 union
427 SRV_FILE_INFO_3 info3; /* file info with 0 entries */
429 } file;
431 } SRV_FILE_INFO_CTR;
434 /* SRV_Q_NET_FILE_ENUM */
435 typedef struct q_net_file_enum_info
437 uint32 ptr_srv_name; /* pointer (to server name?) */
438 UNISTR2 uni_srv_name; /* server name */
440 uint32 ptr_qual_name; /* pointer (to qualifier name) */
441 UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
443 uint32 file_level; /* file level */
445 SRV_FILE_INFO_CTR *ctr;
447 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
448 ENUM_HND enum_hnd;
450 } SRV_Q_NET_FILE_ENUM;
453 /* SRV_R_NET_FILE_ENUM */
454 typedef struct r_net_file_enum_info
456 uint32 file_level; /* file level */
458 SRV_FILE_INFO_CTR *ctr;
460 uint32 total_entries; /* total number of files */
461 ENUM_HND enum_hnd;
463 uint32 status; /* return status */
465 } SRV_R_NET_FILE_ENUM;
467 /* SRV_INFO_101 */
468 typedef struct srv_info_101_info
470 uint32 platform_id; /* 0x500 */
471 uint32 ptr_name; /* pointer to server name */
472 uint32 ver_major; /* 0x4 */
473 uint32 ver_minor; /* 0x2 */
474 uint32 srv_type; /* browse etc type */
475 uint32 ptr_comment; /* pointer to server comment */
477 UNISTR2 uni_name; /* server name "server" */
478 UNISTR2 uni_comment; /* server comment "samba x.x.x blah" */
480 } SRV_INFO_101;
482 /* SRV_INFO_102 */
483 typedef struct srv_info_102_info
485 uint32 platform_id; /* 0x500 */
486 uint32 ptr_name; /* pointer to server name */
487 uint32 ver_major; /* 0x4 */
488 uint32 ver_minor; /* 0x2 */
489 uint32 srv_type; /* browse etc type */
490 uint32 ptr_comment; /* pointer to server comment */
491 uint32 users; /* 0xffff ffff*/
492 uint32 disc; /* 0xf */
493 uint32 hidden; /* 0x0 */
494 uint32 announce; /* 240 */
495 uint32 ann_delta; /* 3000 */
496 uint32 licenses; /* 0 */
497 uint32 ptr_usr_path; /* pointer to user path */
499 UNISTR2 uni_name; /* server name "server" */
500 UNISTR2 uni_comment; /* server comment "samba x.x.x blah" */
501 UNISTR2 uni_usr_path; /* "c:\" (eh?) */
503 } SRV_INFO_102;
506 /* SRV_INFO_CTR */
507 typedef struct srv_info_ctr_info
509 uint32 switch_value; /* switch value */
510 uint32 ptr_srv_ctr; /* pointer to server info */
511 union
513 SRV_INFO_102 sv102; /* server info level 102 */
514 SRV_INFO_101 sv101; /* server info level 101 */
516 } srv;
518 } SRV_INFO_CTR;
520 /* SRV_Q_NET_SRV_GET_INFO */
521 typedef struct q_net_srv_get_info
523 uint32 ptr_srv_name;
524 UNISTR2 uni_srv_name; /* "\\server" */
525 uint32 switch_value;
527 } SRV_Q_NET_SRV_GET_INFO;
529 /* SRV_R_NET_SRV_GET_INFO */
530 typedef struct r_net_srv_get_info
532 SRV_INFO_CTR *ctr;
534 uint32 status; /* return status */
536 } SRV_R_NET_SRV_GET_INFO;
538 /* SRV_Q_NET_SRV_SET_INFO */
539 typedef struct q_net_srv_set_info
541 uint32 ptr_srv_name;
542 UNISTR2 uni_srv_name; /* "\\server" */
543 uint32 switch_value;
545 SRV_INFO_CTR *ctr;
547 } SRV_Q_NET_SRV_SET_INFO;
550 /* SRV_R_NET_SRV_SET_INFO */
551 typedef struct r_net_srv_set_info
553 uint32 switch_value; /* switch value */
555 uint32 status; /* return status */
557 } SRV_R_NET_SRV_SET_INFO;
559 /* SRV_Q_NET_REMOTE_TOD */
560 typedef struct q_net_remote_tod
562 uint32 ptr_srv_name;
563 UNISTR2 uni_srv_name; /* "\\server" */
565 } SRV_Q_NET_REMOTE_TOD;
567 /* TIME_OF_DAY_INFO */
568 typedef struct time_of_day_info
570 uint32 elapsedt;
571 uint32 msecs;
572 uint32 hours;
573 uint32 mins;
574 uint32 secs;
575 uint32 hunds;
576 uint32 zone;
577 uint32 tintervals;
578 uint32 day;
579 uint32 month;
580 uint32 year;
581 uint32 weekday;
583 } TIME_OF_DAY_INFO;
585 /* SRV_R_NET_REMOTE_TOD */
586 typedef struct r_net_remote_tod
588 uint32 ptr_srv_tod; /* pointer to TOD */
589 TIME_OF_DAY_INFO *tod;
591 uint32 status; /* return status */
593 } SRV_R_NET_REMOTE_TOD;
596 #endif /* _RPC_SRVSVC_H */