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 /* SRV_Q_NET_SESS_DEL */
141 typedef struct q_net_sess_del
143 uint32 ptr_srv_name
; /* pointer (to server name?) */
144 UNISTR2 uni_srv_name
; /* server name */
146 uint32 ptr_cli_name
; /* pointer (to qualifier name) */
147 UNISTR2 uni_cli_name
; /* qualifier name "\\qualifier" */
149 uint32 ptr_user_name
; /* pointer (to user name */
150 UNISTR2 uni_user_name
; /* user name */
152 } SRV_Q_NET_SESS_DEL
;
154 /* SRV_R_NET_SESS_DEL */
155 typedef struct r_net_sess_del
157 WERROR status
; /* return status */
159 } SRV_R_NET_SESS_DEL
;
161 /* CONN_INFO_0 (pointers to level 0 connection info strings) */
162 typedef struct ptr_conn_info0
164 uint32 id
; /* connection id. */
168 /* oops - this is going to take up a *massive* amount of stack. */
169 /* the UNISTR2s already have 1024 uint16 chars in them... */
170 #define MAX_CONN_ENTRIES 32
172 /* SRV_CONN_INFO_0 */
173 typedef struct srv_conn_info_0_info
175 uint32 num_entries_read
; /* EntriesRead */
176 uint32 ptr_conn_info
; /* Buffer */
177 uint32 num_entries_read2
; /* EntriesRead */
179 CONN_INFO_0 info_0
[MAX_CONN_ENTRIES
]; /* connection entry pointers */
183 /* CONN_INFO_1 (pointers to level 1 connection info strings) */
184 typedef struct ptr_conn_info1
186 uint32 id
; /* connection id */
187 uint32 type
; /* 0x3 */
192 uint32 ptr_usr_name
; /* pointer to user name. */
193 uint32 ptr_net_name
; /* pointer to network name (e.g IPC$). */
197 /* CONN_INFO_1_STR (level 1 connection info strings) */
198 typedef struct str_conn_info1
200 UNISTR2 uni_usr_name
; /* unicode string of user */
201 UNISTR2 uni_net_name
; /* unicode string of name */
205 /* SRV_CONN_INFO_1 */
206 typedef struct srv_conn_info_1_info
208 uint32 num_entries_read
; /* EntriesRead */
209 uint32 ptr_conn_info
; /* Buffer */
210 uint32 num_entries_read2
; /* EntriesRead */
212 CONN_INFO_1 info_1
[MAX_CONN_ENTRIES
]; /* connection entry pointers */
213 CONN_INFO_1_STR info_1_str
[MAX_CONN_ENTRIES
]; /* connection entry strings */
217 /* SRV_CONN_INFO_CTR */
218 typedef struct srv_conn_info_ctr_info
220 uint32 switch_value
; /* switch value */
221 uint32 ptr_conn_ctr
; /* pointer to conn info union */
224 SRV_CONN_INFO_0 info0
; /* connection info level 0 */
225 SRV_CONN_INFO_1 info1
; /* connection info level 1 */
232 /* SRV_Q_NET_CONN_ENUM */
233 typedef struct q_net_conn_enum_info
235 uint32 ptr_srv_name
; /* pointer (to server name) */
236 UNISTR2 uni_srv_name
; /* server name "\\server" */
238 uint32 ptr_qual_name
; /* pointer (to qualifier name) */
239 UNISTR2 uni_qual_name
; /* qualifier name "\\qualifier" */
241 uint32 conn_level
; /* connection level */
243 SRV_CONN_INFO_CTR
*ctr
;
245 uint32 preferred_len
; /* preferred maximum length (0xffff ffff) */
248 } SRV_Q_NET_CONN_ENUM
;
250 /* SRV_R_NET_CONN_ENUM */
251 typedef struct r_net_conn_enum_info
253 uint32 conn_level
; /* share level */
255 SRV_CONN_INFO_CTR
*ctr
;
257 uint32 total_entries
; /* total number of entries */
260 WERROR status
; /* return status */
262 } SRV_R_NET_CONN_ENUM
;
264 /***************************/
267 uint32 id
; /* file index */
268 uint32 perms
; /* file permissions. don't know what format */
269 uint32 num_locks
; /* file locks */
270 UNISTR2
*path
; /* file name */
271 UNISTR2
*user
; /* file owner */
275 uint32 level
; /* switch value */
276 uint32 ptr_file_info
; /* pointer to file info union */
292 SRV_FILE_INFO_CTR ctr
;
293 uint32 preferred_len
; /* preferred maximum length (0xffff ffff) */
295 } SRV_Q_NET_FILE_ENUM
;
299 SRV_FILE_INFO_CTR ctr
;
300 uint32 total_entries
;
303 } SRV_R_NET_FILE_ENUM
;
305 #endif /* _RPC_SRVSVC_H */