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 Copyright (C) Nigel Williams 2001
8 Copyright (C) Gerald (Jerry) Carter 2006.
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef _RPC_SRVSVC_H /* _RPC_SRVSVC_H */
29 #define SRV_NET_CONN_ENUM 0x08
30 #define SRV_NET_FILE_ENUM 0x09
31 #define SRV_NET_FILE_CLOSE 0x0b
32 #define SRV_NET_SESS_ENUM 0x0c
33 #define SRV_NET_SESS_DEL 0x0d
34 #define SRV_NET_SHARE_ADD 0x0e
35 #define SRV_NET_SHARE_ENUM_ALL 0x0f
36 #define SRV_NET_SHARE_GET_INFO 0x10
37 #define SRV_NET_SHARE_SET_INFO 0x11
38 #define SRV_NET_SHARE_DEL 0x12
39 #define SRV_NET_SHARE_DEL_STICKY 0x13
40 #define SRV_NET_SRV_GET_INFO 0x15
41 #define SRV_NET_SRV_SET_INFO 0x16
42 #define SRV_NET_DISK_ENUM 0x17
43 #define SRV_NET_REMOTE_TOD 0x1c
44 #define SRV_NET_NAME_VALIDATE 0x21
45 #define SRV_NET_SHARE_ENUM 0x24
46 #define SRV_NET_FILE_QUERY_SECDESC 0x27
47 #define SRV_NET_FILE_SET_SECDESC 0x28
49 #define MAX_SERVER_DISK_ENTRIES 15
51 typedef struct disk_info {
56 typedef struct disk_enum_container {
62 } DISK_ENUM_CONTAINER;
64 typedef struct net_srv_disk_enum {
65 uint32 ptr_srv_name; /* pointer (to server name?) */
66 UNISTR2 uni_srv_name; /* server name */
68 DISK_ENUM_CONTAINER disk_enum_ctr;
70 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
71 uint32 total_entries; /* total number of entries */
73 WERROR status; /* return status */
74 } SRV_Q_NET_DISK_ENUM, SRV_R_NET_DISK_ENUM;
76 /***************************/
78 /* oops - this is going to take up a *massive* amount of stack. */
79 /* the UNISTR2s already have 1024 uint16 chars in them... */
81 #define MAX_SESS_ENTRIES 32
88 uint32 num_entries_read;
90 uint32 num_entries_read2;
91 SESS_INFO_0 info_0[MAX_SESS_ENTRIES];
104 uint32 num_entries_read;
105 uint32 ptr_sess_info;
106 uint32 num_entries_read2;
107 SESS_INFO_1 info_1[MAX_SESS_ENTRIES];
114 SRV_SESS_INFO_0 info0;
115 SRV_SESS_INFO_1 info1;
125 SRV_SESS_INFO_CTR *ctr;
126 uint32 preferred_len;
128 } SRV_Q_NET_SESS_ENUM;
132 SRV_SESS_INFO_CTR *ctr;
133 uint32 total_entries;
136 } SRV_R_NET_SESS_ENUM;
138 /***************************/
140 /* CONN_INFO_0 (pointers to level 0 connection info strings) */
141 typedef struct ptr_conn_info0
143 uint32 id; /* connection id. */
147 /* oops - this is going to take up a *massive* amount of stack. */
148 /* the UNISTR2s already have 1024 uint16 chars in them... */
149 #define MAX_CONN_ENTRIES 32
151 /* SRV_CONN_INFO_0 */
152 typedef struct srv_conn_info_0_info
154 uint32 num_entries_read; /* EntriesRead */
155 uint32 ptr_conn_info; /* Buffer */
156 uint32 num_entries_read2; /* EntriesRead */
158 CONN_INFO_0 info_0 [MAX_CONN_ENTRIES]; /* connection entry pointers */
162 /* CONN_INFO_1 (pointers to level 1 connection info strings) */
163 typedef struct ptr_conn_info1
165 uint32 id; /* connection id */
166 uint32 type; /* 0x3 */
171 uint32 ptr_usr_name; /* pointer to user name. */
172 uint32 ptr_net_name; /* pointer to network name (e.g IPC$). */
176 /* CONN_INFO_1_STR (level 1 connection info strings) */
177 typedef struct str_conn_info1
179 UNISTR2 uni_usr_name; /* unicode string of user */
180 UNISTR2 uni_net_name; /* unicode string of name */
184 /* SRV_CONN_INFO_1 */
185 typedef struct srv_conn_info_1_info
187 uint32 num_entries_read; /* EntriesRead */
188 uint32 ptr_conn_info; /* Buffer */
189 uint32 num_entries_read2; /* EntriesRead */
191 CONN_INFO_1 info_1 [MAX_CONN_ENTRIES]; /* connection entry pointers */
192 CONN_INFO_1_STR info_1_str[MAX_CONN_ENTRIES]; /* connection entry strings */
196 /* SRV_CONN_INFO_CTR */
197 typedef struct srv_conn_info_ctr_info
199 uint32 switch_value; /* switch value */
200 uint32 ptr_conn_ctr; /* pointer to conn info union */
203 SRV_CONN_INFO_0 info0; /* connection info level 0 */
204 SRV_CONN_INFO_1 info1; /* connection info level 1 */
211 /* SRV_Q_NET_CONN_ENUM */
212 typedef struct q_net_conn_enum_info
214 uint32 ptr_srv_name; /* pointer (to server name) */
215 UNISTR2 uni_srv_name; /* server name "\\server" */
217 uint32 ptr_qual_name; /* pointer (to qualifier name) */
218 UNISTR2 uni_qual_name; /* qualifier name "\\qualifier" */
220 uint32 conn_level; /* connection level */
222 SRV_CONN_INFO_CTR *ctr;
224 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
227 } SRV_Q_NET_CONN_ENUM;
229 /* SRV_R_NET_CONN_ENUM */
230 typedef struct r_net_conn_enum_info
232 uint32 conn_level; /* share level */
234 SRV_CONN_INFO_CTR *ctr;
236 uint32 total_entries; /* total number of entries */
239 WERROR status; /* return status */
241 } SRV_R_NET_CONN_ENUM;
243 /***************************/
246 uint32 id; /* file index */
247 uint32 perms; /* file permissions. don't know what format */
248 uint32 num_locks; /* file locks */
249 UNISTR2 *path; /* file name */
250 UNISTR2 *user; /* file owner */
254 uint32 level; /* switch value */
255 uint32 ptr_file_info; /* pointer to file info union */
271 SRV_FILE_INFO_CTR ctr;
272 uint32 preferred_len; /* preferred maximum length (0xffff ffff) */
274 } SRV_Q_NET_FILE_ENUM;
278 SRV_FILE_INFO_CTR ctr;
279 uint32 total_entries;
282 } SRV_R_NET_FILE_ENUM;
284 #endif /* _RPC_SRVSVC_H */